Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
73186361
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
73186361
编写于
8月 01, 2011
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
差异文件
merged back the RC branch
上级
009db747
e4ffe6d6
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
459 addition
and
171 deletion
+459
-171
changelog.html
changelog.html
+10
-2
core/pom.xml
core/pom.xml
+12
-1
core/src/main/java/hudson/tools/JDKInstaller.java
core/src/main/java/hudson/tools/JDKInstaller.java
+214
-164
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/credentialOK.jelly
...dson/tools/JDKInstaller/DescriptorImpl/credentialOK.jelly
+34
-0
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
...n/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
+52
-0
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.properties
...ls/JDKInstaller/DescriptorImpl/enterCredential.properties
+1
-0
core/src/main/resources/hudson/tools/JDKInstaller/config.jelly
...src/main/resources/hudson/tools/JDKInstaller/config.jelly
+3
-3
core/src/main/resources/hudson/tools/Messages.properties
core/src/main/resources/hudson/tools/Messages.properties
+1
-0
core/src/test/java/jenkins/RemotingJarSignatureTest.java
core/src/test/java/jenkins/RemotingJarSignatureTest.java
+49
-0
debian/debian/changelog
debian/debian/changelog
+6
-0
pom.xml
pom.xml
+1
-1
test/src/test/java/hudson/tools/JDKInstallerTest.java
test/src/test/java/hudson/tools/JDKInstallerTest.java
+76
-0
未找到文件。
changelog.html
浏览文件 @
73186361
...
...
@@ -69,8 +69,14 @@ Upcoming changes</a>
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div
id=
"rc"
style=
"display:none;"
>
<!--=BEGIN=-->
<h3><a
name=
v1.424
>
What's new in 1.424
</a>
<!--=DATE=-->
</h3>
<h3><a
name=
v1.425
>
What's new in 1.425
</a>
<!--=DATE=-->
</h3>
<!--=RC-CHANGES=-->
</div>
<!--=END=-->
<h3><a
name=
v1.424
>
What's new in 1.424
</a>
(2011/08/01)
</h3>
<ul
class=
image
>
<li
class=
'major bug'
>
Java Web Start binaries weren't signed.
(
<a
href=
"http://jenkins.361315.n4.nabble.com/Launching-slave-agent-not-working-since-upgrading-from-1-421-to-1-423-td3696291.html"
>
report
</a>
)
<li
class=
bug
>
Fixed Maven build error if headless option is set and MAVEN_OPTS empty
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-10375"
>
issue 10375
</a>
)
...
...
@@ -92,8 +98,10 @@ Upcoming changes</a>
<li
class=
rfe
>
Maven jobs which are disabled should be excluded from dependency graph
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-10367"
>
issue 10367
</a>
)
<li
class=
'major rfe'
>
Updated JDK installer to reflect changes in Oracle download server
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-10511"
>
issue 10511
</a>
)
</ul>
</div>
<!--=END=-->
<h3><a
name=
v1.423
>
What's new in 1.423
</a>
(2011/07/25)
</h3>
<ul
class=
image
>
<li
class=
'major bug'
>
...
...
core/pom.xml
浏览文件 @
73186361
...
...
@@ -147,7 +147,18 @@ THE SOFTWARE.
<dependency>
<!-- until we get this version through Stapler -->
<groupId>
org.kohsuke.stapler
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.1-rev6
</version>
<version>
2.1-rev7
</version>
</dependency>
<dependency>
<groupId>
org.jenkins-ci
</groupId>
<artifactId>
htmlunit
</artifactId>
<version>
2.6-jenkins-4
</version>
<exclusions>
<exclusion>
<groupId>
xml-apis
</groupId>
<artifactId>
xml-apis
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
args4j
</groupId>
...
...
core/src/main/java/hudson/tools/JDKInstaller.java
浏览文件 @
73186361
此差异已折叠。
点击以展开。
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/credentialOK.jelly
0 → 100644
浏览文件 @
73186361
<!--
The MIT License
Copyright (c) 2011, CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${%Credential is saved}">
<l:main-panel>
<p>
${%Credential is saved}
</p>
<input type="button" value="${%Close}" class="yui-button" onclick="window.close()" />
</l:main-panel>
</l:layout>
</j:jelly>
\ No newline at end of file
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
0 → 100644
浏览文件 @
73186361
<!--
The MIT License
Copyright (c) 2011, CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<l:layout title="${%Enter Your Oracle Account}">
<l:main-panel>
<h1>
<img src="${imagesURL}/48x48/secure.gif" width="48" height="48" alt=""/>
${%Enter Your Oracle Account}
</h1>
<p>
${%description}
</p>
<f:form method="post" action="postCredential" name="postCredential">
<j:set var="descriptor" value="${it}" />
<f:entry title="${%Username}">
<f:textbox name="username"/>
</f:entry>
<f:entry title="${%Password}">
<f:password name="password"/>
</f:entry>
<f:block>
<f:submit value="${%OK}" style="margin-top:1em;"/>
</f:block>
</f:form>
</l:main-panel>
</l:layout>
</j:jelly>
core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.properties
0 → 100644
浏览文件 @
73186361
description
=
To access older versions of JDK, you need to have <a href="http://jenkins-ci.org/oracleAccountSignup">Oracle Account</a>.
\ No newline at end of file
core/src/main/resources/hudson/tools/JDKInstaller/config.jelly
浏览文件 @
73186361
<!--
The MIT License
Copyright (c) 2009, Sun Microsystems, Inc.
Copyright (c) 2009, Sun Microsystems, Inc.
, CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
...
...
@@ -35,8 +35,8 @@ THE SOFTWARE.
<select name="_.id">
<j:forEach var="family" items="${jdks}">
<optgroup label="${family.name}">
<j:forEach var="jdk" items="${family.
list
}">
<f:option value="${jdk.
id}" selected="${jdk.id==instance.id}">${jdk.nam
e}</f:option>
<j:forEach var="jdk" items="${family.
releases
}">
<f:option value="${jdk.
name}" selected="${jdk.matchesId(instance.id)}">${jdk.titl
e}</f:option>
</j:forEach>
</optgroup>
</j:forEach>
...
...
core/src/main/resources/hudson/tools/Messages.properties
浏览文件 @
73186361
...
...
@@ -25,6 +25,7 @@ CommandInstaller.DescriptorImpl.displayName=Run Command
CommandInstaller.no_command
=
Must provide a command to run.
CommandInstaller.no_toolHome
=
Must provide a tool home directory.
JDKInstaller.FailedToInstallJDK
=
Failed to install JDK. Exit code={0}
JDKInstaller.RequireOracleAccount
=
Installing JDK requires Oracle account. <a href="{0}" target="_new">Please enter your username/password</a>
JDKInstaller.UnableToInstallUntilLicenseAccepted
=
Unable to auto-install JDK until the license is accepted.
ZipExtractionInstaller.DescriptorImpl.displayName
=
Extract *.zip/*.tar.gz
ZipExtractionInstaller.bad_connection
=
Server rejected connection.
...
...
core/src/test/java/jenkins/RemotingJarSignatureTest.java
0 → 100644
浏览文件 @
73186361
package
jenkins
;
import
hudson.remoting.Channel
;
import
hudson.remoting.Which
;
import
hudson.util.IOUtils
;
import
org.apache.commons.io.output.NullOutputStream
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
java.io.File
;
import
java.util.Enumeration
;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarFile
;
/**
* @author Kohsuke Kawaguchi
*/
public
class
RemotingJarSignatureTest
{
/**
* Makes sure that the remoting jar is properly signed.
*/
@Test
public
void
testSignature
()
throws
Exception
{
File
jar
=
Which
.
jarFile
(
Channel
.
class
);
// File jar = new File("/home/kohsuke/.m2/repository/org/jenkins-ci/main/remoting/1.421/remoting-1.421.jar");
// File jar = new File("/home/kohsuke/.m2/repository/org/jenkins-ci/main/remoting/2.0/remoting-2.0.jar");
System
.
out
.
println
(
"Verifying "
+
jar
);
JarFile
myJar
=
new
JarFile
(
jar
,
true
);
Enumeration
<
JarEntry
>
entries
=
myJar
.
entries
();
while
(
entries
.
hasMoreElements
())
{
JarEntry
entry
=
entries
.
nextElement
();
if
(
entry
.
isDirectory
())
continue
;
// unsigned files that are related to signatures
String
name
=
entry
.
getName
();
if
(
name
.
equals
(
"META-INF/MANIFEST.MF"
))
continue
;
if
(
name
.
startsWith
(
"META-INF/"
)
&&
name
.
endsWith
(
".SF"
))
continue
;
if
(
name
.
startsWith
(
"META-INF/"
)
&&
name
.
endsWith
(
".RSA"
))
continue
;
// make sure bits are signed
IOUtils
.
copy
(
myJar
.
getInputStream
(
entry
),
new
NullOutputStream
());
if
(
entry
.
getCodeSigners
()==
null
)
{
Assert
.
fail
(
"No signature for "
+
name
);
}
}
}
}
debian/debian/changelog
浏览文件 @
73186361
jenkins (1.424) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
-- Kohsuke Kawaguchi <kk@kohsuke.org> Mon, 01 Aug 2011 11:31:30 -0700
jenkins (1.423) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
...
...
pom.xml
浏览文件 @
73186361
...
...
@@ -133,7 +133,7 @@ THE SOFTWARE.
<dependency>
<groupId>
org.jenkins-ci.main
</groupId>
<artifactId>
remoting
</artifactId>
<version>
2.
2
</version>
<version>
2.
4
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
test/src/test/java/hudson/tools/JDKInstallerTest.java
浏览文件 @
73186361
package
hudson.tools
;
import
com.gargoylesoftware.htmlunit.html.HtmlForm
;
import
com.gargoylesoftware.htmlunit.html.HtmlPage
;
import
hudson.model.Descriptor
;
import
hudson.model.DownloadService
;
import
hudson.tools.JDKInstaller.DescriptorImpl
;
import
org.jvnet.hudson.test.HudsonTestCase
;
import
hudson.model.JDK
;
import
hudson.model.FreeStyleProject
;
...
...
@@ -14,13 +19,67 @@ import hudson.Functions;
import
hudson.Launcher.LocalLauncher
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.Properties
;
import
java.util.logging.Logger
;
import
org.jvnet.hudson.test.Bug
;
import
org.xml.sax.SAXException
;
/**
* @author Kohsuke Kawaguchi
*/
public
class
JDKInstallerTest
extends
HudsonTestCase
{
boolean
old
;
@Override
protected
void
setUp
()
throws
Exception
{
super
.
setUp
();
old
=
DownloadService
.
neverUpdate
;
DownloadService
.
neverUpdate
=
false
;
File
f
=
new
File
(
new
File
(
System
.
getProperty
(
"user.home"
)),
".jenkins-ci.org"
);
if
(!
f
.
exists
())
{
LOGGER
.
warning
(
f
+
" doesn't exist. Skipping JDK installation tests"
);
}
else
{
Properties
prop
=
new
Properties
();
FileInputStream
in
=
new
FileInputStream
(
f
);
try
{
prop
.
load
(
in
);
String
u
=
prop
.
getProperty
(
"oracle.userName"
);
String
p
=
prop
.
getProperty
(
"oracle.password"
);
if
(
u
==
null
||
p
==
null
)
{
LOGGER
.
warning
(
f
+
" doesn't contain oracle.userName and oracle.password. Skipping JDK installation tests."
);
}
else
{
DescriptorImpl
d
=
jenkins
.
getDescriptorByType
(
DescriptorImpl
.
class
);
d
.
doPostCredential
(
u
,
p
);
}
}
finally
{
in
.
close
();
}
}
}
@Override
protected
void
tearDown
()
throws
Exception
{
DownloadService
.
neverUpdate
=
old
;
super
.
tearDown
();
}
public
void
testEnterCredential
()
throws
Exception
{
HtmlPage
p
=
createWebClient
().
goTo
(
"/descriptorByName/hudson.tools.JDKInstaller/enterCredential"
);
HtmlForm
form
=
p
.
getFormByName
(
"postCredential"
);
form
.
getInputByName
(
"username"
).
setValueAttribute
(
"foo"
);
form
.
getInputByName
(
"password"
).
setValueAttribute
(
"bar"
);
form
.
submit
(
null
);
DescriptorImpl
d
=
jenkins
.
getDescriptorByType
(
DescriptorImpl
.
class
);
assertEquals
(
"foo"
,
d
.
getUsername
());
assertEquals
(
"bar"
,
d
.
getPassword
().
getPlainText
());
}
/**
* Tests the configuration round trip.
*/
...
...
@@ -43,6 +102,8 @@ public class JDKInstallerTest extends HudsonTestCase {
* Can we locate the bundles?
*/
public
void
testLocate
()
throws
Exception
{
retrieveUpdateCenterData
();
JDKInstaller
i
=
new
JDKInstaller
(
"jdk-6u13-oth-JPR@CDS-CDS_Developer"
,
true
);
StreamTaskListener
listener
=
StreamTaskListener
.
fromStdout
();
i
.
locate
(
listener
,
Platform
.
LINUX
,
CPU
.
i386
);
...
...
@@ -50,6 +111,10 @@ public class JDKInstallerTest extends HudsonTestCase {
i
.
locate
(
listener
,
Platform
.
SOLARIS
,
CPU
.
Sparc
);
}
private
void
retrieveUpdateCenterData
()
throws
IOException
,
SAXException
{
new
WebClient
().
goTo
(
"/"
);
// make sure data is loaded
}
/**
* Tests the auto installation.
*/
...
...
@@ -57,6 +122,13 @@ public class JDKInstallerTest extends HudsonTestCase {
doTestAutoInstallation
(
"jdk-6u13-oth-JPR@CDS-CDS_Developer"
,
"1.6.0_13-b03"
);
}
/**
* JDK7 is distributed as a gzip file
*/
public
void
testAutoInstallation7
()
throws
Exception
{
doTestAutoInstallation
(
"jdk-7-oth-JPR"
,
"1.7.0-b147"
);
}
@Bug
(
3989
)
public
void
testAutoInstallation142_17
()
throws
Exception
{
doTestAutoInstallation
(
"j2sdk-1.4.2_17-oth-JPR@CDS-CDS_Developer"
,
"1.4.2_17-b06"
);
...
...
@@ -70,6 +142,8 @@ public class JDKInstallerTest extends HudsonTestCase {
if
(!
Boolean
.
getBoolean
(
"hudson.sunTests"
))
return
;
retrieveUpdateCenterData
();
File
tmp
=
env
.
temporaryDirectoryAllocator
.
allocate
();
JDKInstaller
installer
=
new
JDKInstaller
(
id
,
true
);
...
...
@@ -115,4 +189,6 @@ public class JDKInstallerTest extends HudsonTestCase {
bundle
.
delete
();
}
}
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
JDKInstallerTest
.
class
.
getName
());
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录