提交 73186361 编写于 作者: K Kohsuke Kawaguchi

merged back the RC branch

......@@ -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'>
......
......@@ -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>
......
<!--
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
<!--
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>
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
<!--
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.name}</f:option>
<j:forEach var="jdk" items="${family.releases}">
<f:option value="${jdk.name}" selected="${jdk.matchesId(instance.id)}">${jdk.title}</f:option>
</j:forEach>
</optgroup>
</j:forEach>
......
......@@ -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.
......
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);
}
}
}
}
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.
......
......@@ -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>
......
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.
先完成此消息的编辑!
想要评论请 注册