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

Merge branch 'master' of github.com:jenkinsci/jenkins

......@@ -55,17 +55,35 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
</ul>
</div><!--=TRUNK-END=-->
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.430>What's new in 1.430</a> <!--=DATE=--></h3>
<ul class=image>
<li class=bug>
Added way to mark all plugins to be updated at once
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10443">issue 10443</a>)
<li class=bug>
Fixed a bug in the UI JavaScript behavior with IE
<li class=bug>
Matrix project pages don't show latest test results.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10864">issue 10864</a>)
<li class=rfe>
Bundling <a href="https://wiki.jenkins-ci.org/display/JENKINS/Translation+Assistance+Plugin">the translation assistance plugin</a> in the hope of increasing the contribution.
<li class=rfe>
Introduce a fine-grained permission to control who is allowed to run the Groovy Console.
<li class=rfe>
Maven jobs should include fingerprints of their parent POMs
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-8383">issue 8383</a>)
<li class=rfe>
Add support for maven-android-plugin integration test reports
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10913">issue 10913</a>)
</ul>
</div><!--=TRUNK-END=-->
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.429>What's new in 1.429</a> <!--=DATE=--></h3>
</div><!--=END=-->
<h3><a name=v1.429>What's new in 1.429</a> (2011/09/06)</h3>
<ul class=image>
<li class=bug>
maven submodule build fails doing mkdir on master.
......@@ -95,7 +113,6 @@ Upcoming changes</a>
External job submision now supports &ly;displayName> and &lt;description> elements
(<a href="https://github.com/jenkinsci/jenkins/pull/215">pull 215</a>)
</ul>
</div><!--=END=-->
<h3><a name=v1.428>What's new in 1.428</a> (2011/08/29)</h3>
<ul class=image>
<li class=bug>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>pom</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
</parent>
<artifactId>cli</artifactId>
......
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -69,8 +69,8 @@ public class GroovyCommand extends CLICommand implements Serializable {
public List<String> remaining = new ArrayList<String>();
protected int run() throws Exception {
// this allows the caller to manipulate the JVM state, so require the admin privilege.
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
// this allows the caller to manipulate the JVM state, so require the execute script privilege.
Jenkins.getInstance().checkPermission(Jenkins.RUN_SCRIPTS);
Binding binding = new Binding();
binding.setProperty("out",new PrintWriter(stdout,true));
......
......@@ -66,6 +66,9 @@ import java.util.StringTokenizer;
import java.util.List;
import java.util.Collections;
import java.util.Set;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
/**
* Build by using Maven.
......@@ -413,8 +416,16 @@ public class Maven extends Builder {
File[] jars = new File(getHomeDir(),"lib").listFiles();
if(jars!=null) { // be defensive
for (File jar : jars) {
if (jar.getName().endsWith("-uber.jar") && jar.getName().startsWith("maven-")) {
return jar.getName();
if (jar.getName().startsWith("maven-")) {
JarFile jf = null;
try {
jf = new JarFile(jar);
Manifest manifest = jf.getManifest();
String version = manifest.getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION);
if(version != null) return version;
} finally {
if(jf != null) jf.close();
}
}
}
}
......@@ -424,15 +435,15 @@ public class Maven extends Builder {
if (!mavenVersion.equals("")) {
if (mavenReqVersion == MAVEN_20) {
if(mavenVersion.startsWith("maven-2.") || mavenVersion.startsWith("maven-core-2"))
if(mavenVersion.startsWith("2."))
return true;
}
else if (mavenReqVersion == MAVEN_21) {
if(mavenVersion.startsWith("maven-2.") && !mavenVersion.startsWith("maven-2.0"))
if(mavenVersion.startsWith("2.") && !mavenVersion.startsWith("2.0"))
return true;
}
else if (mavenReqVersion == MAVEN_30) {
if(mavenVersion.startsWith("maven-3.") && !mavenVersion.startsWith("maven-2.0"))
if(mavenVersion.startsWith("3.") && !mavenVersion.startsWith("2.0"))
return true;
}
}
......
......@@ -25,6 +25,7 @@
*/
package jenkins.model;
import hudson.model.Messages;
import hudson.model.Node;
import hudson.model.AbstractCIBase;
import hudson.model.AbstractProject;
......@@ -3128,7 +3129,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableItemGroup<TopLe
private void doScript(StaplerRequest req, StaplerResponse rsp, RequestDispatcher view) throws IOException, ServletException {
// ability to run arbitrary script is dangerous
checkPermission(ADMINISTER);
checkPermission(RUN_SCRIPTS);
String text = req.getParameter("script");
if (text != null) {
......@@ -3624,6 +3625,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableItemGroup<TopLe
public static final PermissionGroup PERMISSIONS = Permission.HUDSON_PERMISSIONS;
public static final Permission ADMINISTER = Permission.HUDSON_ADMINISTER;
public static final Permission READ = new Permission(PERMISSIONS,"Read",Messages._Hudson_ReadPermission_Description(),Permission.READ,PermissionScope.JENKINS);
public static final Permission RUN_SCRIPTS = new Permission(PERMISSIONS, "RunScripts", Messages._Hudson_RunScriptsPermission_Description(),ADMINISTER,PermissionScope.JENKINS);
/**
* {@link Authentication} object that represents the anonymous user.
......
......@@ -29,6 +29,7 @@ THE SOFTWARE.
<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">
<local:table page="updates" list="${app.updateCenter.updates}" xmlns:local="/hudson/PluginManager">
<div style="margin-top:1em">
Select: <a href="javascript:toggleCheckboxes(true);">All</a>, <a href="javascript:toggleCheckboxes(false);">None</a><br/>
${%UpdatePageDescription}
<j:if test="${!empty(app.updateCenter.jobs)}">
<br/> ${%UpdatePageLegend(rootURL+'/updateCenter/')}
......
......@@ -143,6 +143,9 @@ Hudson.ReadPermission.Description=\
This permission is useful when you don''t want unauthenticated users to see \
Jenkins pages &mdash; revoke this permission from the anonymous user, then \
add "authenticated" pseudo-user and grant the read access.
Hudson.RunScriptsPermission.Description=\
The "run scripts" permission is necessary for running groovy scripts \
via the groovy console or groovy cli command.
Hudson.NodeDescription=the master Jenkins node
Item.Permissions.Title=Job
......
......@@ -92,9 +92,11 @@ THE SOFTWARE.
<local:feature icon="terminal.png" href="cli" title="${%Jenkins CLI}">
${%JenkinsCliText}
</local:feature>
<local:feature icon="notepad.png" href="script" title="${%Script Console}">
${%Executes arbitrary script for administration/trouble-shooting/diagnostics.}
</local:feature>
<l:hasPermission permission="${it.RUN_SCRIPTS}">
<local:feature icon="notepad.png" href="script" title="${%Script Console}">
${%Executes arbitrary script for administration/trouble-shooting/diagnostics.}
</local:feature>
</l:hasPermission>
<local:feature icon="network.png" href="computer/" title="${%Manage Nodes}">
${%Add, remove, control and monitor the various nodes that Jenkins runs jobs on.}
</local:feature>
......
......@@ -27,7 +27,7 @@ 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 norefresh="true">
<l:layout norefresh="true" permission="${h.RUN_SCRIPTS}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
......
jenkins (1.429) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
-- Kohsuke Kawaguchi <kk@kohsuke.org> Tue, 06 Sep 2011 11:59:51 -0700
jenkins (1.428) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
......
......@@ -24,12 +24,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<service_bundle type="manifest" name="Hudson">
<service name="application/hudson" type="service" version="1">
<service_bundle type="manifest" name="Jenkins">
<service name="application/jenkins" type="service" version="1">
<create_default_instance enabled="true" />
<!-- Only one instance of Hudson should ever run per server -->
<!-- Only one instance of Jenkins should ever run per server -->
<single_instance />
<dependency name="multi-user-server" type="service" grouping="require_all" restart_on="none">
......@@ -40,12 +40,12 @@ THE SOFTWARE.
<method_credential user='root' group='root' />
<method_environment>
<envvar name='PATH' value='/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/usr/sfw/bin' />
<envvar name='HUDSON_HOME' value='/var/lib/hudson' />
<envvar name='JENKINS_HOME' value='/var/lib/jenkins' />
</method_environment>
</method_context>
<!-- Set the HUDSON_HOME env variable, and run the war file in /apps/hudson/hudson.war -->
<exec_method type="method" name="start" exec="java -Xmx512m -jar /usr/local/bin/hudson.war" timeout_seconds="0"/>
<!-- Set the HUDSON_HOME env variable, and run the war file in /apps/jenkins/jenkins.war -->
<exec_method type="method" name="start" exec="java -Xmx512m -jar /usr/local/bin/jenkins.war" timeout_seconds="0"/>
<exec_method type="method" name="stop" exec=":kill -TERM" timeout_seconds="30"/>
<!-- We are going to be kicking off a single child process so we want Wait mode-->
......@@ -57,10 +57,10 @@ THE SOFTWARE.
<template>
<common_name>
<loctext xml:lang='C'>Hudson Continuous Build Server</loctext>
<loctext xml:lang='C'>Jenkins Continuous Build Server</loctext>
</common_name>
<documentation>
<doc_link name='hudson.dev.java.net' uri='https://hudson.dev.java.net/' />
<doc_link name='jenkins-ci.org' uri='http://jenkins-ci.org/' />
</documentation>
</template>
</service>
......
......@@ -31,21 +31,21 @@ version = builder.props['version']
if version.endswith("-SNAPSHOT"):
version = version[:-9];
pkg = builder.build_pkg(name="hudson", version=version+",0-0")
pkg = builder.build_pkg(name="jenkins", version=version+",0-0")
pkg.update({
"attributes" : {
"pkg.summary" : "Hudson",
"pkg.summary" : "Jenkins",
"pkg.description" : "Extensible continuous integration system",
}
})
# restart_fmri instructs IPS to reload the manifest
pkg.addfile("/usr/local/bin/hudson.war",{"file":"./target/hudson.war"})
pkg.addfile("/var/svc/manifest/application/hudson.xml",{"file":"../ips/hudson.xml","restart_fmri":"svc:/system/manifest-import:default"})
pkg.addfile("/usr/local/bin/jenkins.war",{"file":"./target/jenkins.war"})
pkg.addfile("/var/svc/manifest/application/jenkins.xml",{"file":"../ips/jenkins.xml","restart_fmri":"svc:/system/manifest-import:default"})
# this is the Hudson home directory
pkg.mkdirs("/var/lib/hudson")
pkg.mkdirs("/var/lib/jenkins")
# TODO: register SMF when the feature is available?
# see http://www.pauloswald.com/article/29/hudson-solaris-smf-manifest
# see http://blogs.sun.com/wittyman/entry/postgresql_packages_from_ips_repository
\ No newline at end of file
# see http://blogs.sun.com/wittyman/entry/postgresql_packages_from_ips_repository
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin</artifactId>
......
......@@ -255,7 +255,7 @@ public abstract class AbstractMavenProcessFactory
public String getMavenOpts() {
if( this.mavenOpts != null )
return this.mavenOpts;
return addRunHeadLessOption(this.mavenOpts);
String mavenOpts = mms.getMavenOpts();
......@@ -277,6 +277,13 @@ public abstract class AbstractMavenProcessFactory
}
}
mavenOpts = addRunHeadLessOption(mavenOpts);
return envVars.expand(mavenOpts);
}
protected String addRunHeadLessOption(String mavenOpts) {
if (mms.runHeadless()) {
// Configure headless process
if (mavenOpts == null) {
......@@ -292,8 +299,7 @@ public abstract class AbstractMavenProcessFactory
// TODO mavenOpts += " -Xdock:name=Jenkins -Xdock:icon=jenkins.png";
}
}
return envVars.expand(mavenOpts);
return mavenOpts;
}
......
......@@ -81,10 +81,12 @@ public class MavenFingerprinter extends MavenReporter {
* Mojos perform different dependency resolution, so we need to check this for each mojo.
*/
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException {
record(pom.getArtifacts(),used);
// TODO (kutzi, 2011/09/06): it should be perfectly save to move all these records to the
// postBuild method as artifacts should only be added by mojos, but never removed/modified.
record(pom.getArtifacts(),used);
record(pom.getArtifact(),produced);
record(pom.getAttachedArtifacts(),produced);
record(pom.getGroupId(),pom.getFile(),produced);
record(pom.getGroupId() + ":" + pom.getArtifactId(),pom.getFile(),produced);
return true;
}
......@@ -93,7 +95,11 @@ public class MavenFingerprinter extends MavenReporter {
* Sends the collected fingerprints over to the master and record them.
*/
public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException {
recordParents(pom);
build.executeAsync(new BuildCallable<Void,IOException>() {
private static final long serialVersionUID = -1360161848504044869L;
// record is transient, so needs to make a copy first
private final Map<String,String> u = used;
private final Map<String,String> p = produced;
......@@ -119,6 +125,27 @@ public class MavenFingerprinter extends MavenReporter {
return true;
}
private void recordParents(MavenProject pom) throws IOException, InterruptedException {
MavenProject parent = pom.getParent();
while (parent != null) {
File parentFile = parent.getFile();
if (parentFile == null) {
// Parent artifact contains no actual file, so we resolve against
// the local repository
parentFile = parent.getProjectBuildingRequest()
.getLocalRepository().find(parent.getArtifact())
.getFile();
}
// we need to include the artifact Id for poms as well, otherwise a
// project with the same groupId would override its parent's
// fingerprint
record(parent.getGroupId() + ":" + parent.getArtifactId(),
parentFile, used);
parent = parent.getParent();
}
}
private void record(Collection<Artifact> artifacts, Map<String,String> record) throws IOException, InterruptedException {
for (Artifact a : artifacts)
record(a,record);
......@@ -139,14 +166,14 @@ public class MavenFingerprinter extends MavenReporter {
* This method contains the logic to avoid doubly recording the fingerprint
* of the same file.
*/
private void record(String groupId, File f, Map<String, String> record) throws IOException, InterruptedException {
private void record(String fileNamePrefix, File f, Map<String, String> record) throws IOException, InterruptedException {
if(f==null || files.contains(f) || !f.isFile())
return;
// new file
files.add(f);
String digest = new FilePath(f).digest();
record.put(groupId+':'+f.getName(),digest);
record.put(fileNamePrefix+':'+f.getName(),digest);
}
@Extension
......
......@@ -230,6 +230,7 @@ public class SurefireArchiver extends MavenReporter {
&& (!mojo.is("org.eclipse.tycho", "tycho-surefire-plugin", "test"))
&& (!mojo.is("org.sonatype.tycho", "maven-osgi-test-plugin", "test"))
&& (!mojo.is("org.codehaus.mojo", "gwt-maven-plugin", "test"))
&& (!mojo.is("com.jayway.maven.plugins.android.generation2", "maven-android-plugin", "internal-integration-test"))
&& (!mojo.is("org.apache.maven.plugins", "maven-surefire-plugin", "test"))
&& (!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test")))
return false;
......@@ -279,6 +280,11 @@ public class SurefireArchiver extends MavenReporter {
if (((skipTests != null) && (skipTests))) {
return false;
}
} else if (mojo.is("com.jayway.maven.plugins.android.generation2", "maven-android-plugin", "internal-integration-test")) {
Boolean skipTests = mojo.getConfigurationValue("skipTests", Boolean.class);
if (((skipTests != null) && (skipTests))) {
return false;
}
}
} catch (ComponentConfigurationException e) {
......
......@@ -10,7 +10,7 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<name>Jenkins plugin POM</name>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<packaging>pom</packaging>
<!--
......@@ -33,7 +33,7 @@
<dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
<groupId>org.jenkins-ci.main</groupId>
<artifactId>maven-plugin</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -43,25 +43,25 @@
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-war</artifactId>
<type>war</type>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>ui-samples-plugin</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
......
......@@ -33,7 +33,7 @@ THE SOFTWARE.
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Jenkins main module</name>
......
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<artifactId>pom</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
</parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
......
......@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
</parent>
<artifactId>ui-samples-plugin</artifactId>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.430-SNAPSHOT</version>
<version>1.431-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -1216,7 +1216,7 @@ function refillOnChange(e,onChange) {
if (window.YUI!=null) YUI.log("Unable to find a nearby control of the name "+name,"warn")
return;
}
try { c.addEventListener("change",h,false); } catch (ex) { c.attachEvent("change",h); }
try { c.addEventListener("change",h,false); } catch (ex) { c.attachEvent("onchange",h); }
deps.push({name:Path.tail(name),control:c});
});
}
......@@ -1944,6 +1944,19 @@ function buildFormTree(form) {
}
}
/**
* @param {boolean} toggle
* When true, will check all checkboxes in the page. When false, unchecks them all.
*/
var toggleCheckboxes = function(toggle) {
var inputs = document.getElementsByTagName("input");
for(var i=0; i<inputs.length; i++) {
if(inputs[i].type === "checkbox") {
inputs[i].checked = toggle;
}
}
};
// this used to be in prototype.js but it must have been removed somewhere between 1.4.0 to 1.5.1
String.prototype.trim = function() {
var temp = this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册