提交 98698e3d 编写于 作者: K Kohsuke Kawaguchi

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

......@@ -18,7 +18,7 @@ Our latest and greatest source of Jenkins CI can be found on [GitHub]. Fork us!
News and Website
----------------
All about Jenkins CI can be found on our [website]. Follow us an Twitter @[jenkinsci].
All about Jenkins CI can be found on our [website]. Follow us on Twitter @[jenkinsci].
[ButlerImage]: http://jenkins-ci.org/sites/default/files/jenkins_logo.png
[MIT License]: https://github.com/jenkinsci/jenkins/raw/master/LICENSE.txt
......
......@@ -54,6 +54,14 @@ 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.418>What's new in 1.418</a> <!--=DATE=--></h3>
<ul class=image>
<li class=bug>
"0 tests started to fail" makes no sense
......@@ -71,12 +79,20 @@ Upcoming changes</a>
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-5577">issue 5577</a>)
<li class=rfe>
Making views more reusable outside the root object.
<li class=ref>
Added a new hudson.footerURL system property to tweak the link displayed at
the bottom of the UI
<li class=ref>
Added a new hudson.security.WipeOutPermission system property to enable a
new WipeOut permission controlling the "Wipe Out Workspace" action.
</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.416>What's new in 1.416</a> <!--=DATE=--></h3>
</div><!--=END=-->
<h3><a name=v1.417>What's new in 1.417</a> (2011/06/20)</h3>
<ul class=image>
<li class='major bug'>
Fixed a regression in 1.416 that broke cloud plugins like libvirt and EC2.
</ul>
<h3><a name=v1.416>What's new in 1.416</a> (2011/06/18)</h3>
<ul class=image>
<li class=rfe>
Make captcha support optional; remove LGPL jcaptcha
......@@ -127,7 +143,6 @@ Upcoming changes</a>
<li class='major rfe'>
Added a mechanism to write views in Groovy. The interface isn't committed yet. We are looking for feedback.
</ul>
</div><!--=END=-->
<h3><a name=v1.415>What's new in 1.415</a> (2011/06/12)</h3>
<ul class=image>
<li class=bug>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>pom</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
</parent>
<artifactId>cli</artifactId>
<name>Jenkins CLI</name>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -2,7 +2,8 @@
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Romain Seguy
* Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Manufacture
* Francaise des Pneumatiques Michelin, Romain Seguy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -108,6 +109,7 @@ import java.util.logging.LogManager;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
/**
* Utility functions used in views.
......@@ -648,6 +650,20 @@ public class Functions {
return buf.toString();
}
/**
* Returns the link to be displayed in the footer of the UI.
*/
public static String getFooterURL() {
if(footerURL == null) {
footerURL = System.getProperty("hudson.footerURL");
if(StringUtils.isBlank(footerURL)) {
footerURL = "http://jenkins-ci.org/";
}
}
return footerURL;
}
private static String footerURL = null;
public static List<JobPropertyDescriptor> getJobPropertyDescriptors(Class<? extends Job> clazz) {
return JobPropertyDescriptor.getPropertyDescriptors(clazz);
}
......@@ -1321,16 +1337,31 @@ public class Functions {
* {@code false} otherwise.
*
* <p>When the {@link Run#ARTIFACTS} permission is not turned on using the
* {@code hudson.security.ArtifactsPermission}, this permission must not be
* considered to be set to {@code false} for every user. It must rather be
* like if the permission doesn't exist at all (which means that every user
* has to have an access to the artifacts but the permission can't be
* configured in the security screen). Got it?</p>
* {@code hudson.security.ArtifactsPermission} system property, this
* permission must not be considered to be set to {@code false} for every
* user. It must rather be like if the permission doesn't exist at all
* (which means that every user has to have an access to the artifacts but
* the permission can't be configured in the security screen). Got it?</p>
*/
public static boolean isArtifactsPermissionEnabled() {
return Boolean.getBoolean("hudson.security.ArtifactsPermission");
}
/**
* Returns {@code true} if the {@link Item#WIPEOUT} permission is enabled,
* {@code false} otherwise.
*
* <p>The "Wipe Out Workspace" action available on jobs is controlled by the
* {@link Item#BUILD} permission. For some specific projects, however, it is
* not acceptable to let users have this possibility, even it they can
* trigger builds. As such, when enabling the {@code hudson.security.WipeOutPermission}
* system property, a new "WipeOut" permission will allow to have greater
* control on the "Wipe Out Workspace" action.</p>
*/
public static boolean isWipeOutPermissionEnabled() {
return Boolean.getBoolean("hudson.security.WipeOutPermission");
}
public static String createRenderOnDemandProxy(JellyContext context, String attributesToCapture) {
return Stapler.getCurrentRequest().createJavaScriptProxy(new RenderOnDemandClosure(context,attributesToCapture));
}
......
......@@ -4,7 +4,8 @@
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
* Brian Westrich, Erik Ramfelt, Ertan Deniz, Jean-Baptiste Quenot,
* Luca Domenico Milanesio, R. Tyler Ballance, Stephen Connolly, Tom Huybrechts,
* id:cactusman, Yahoo! Inc., Andrew Bayer
* id:cactusman, Yahoo! Inc., Andrew Bayer, Manufacture Francaise des Pneumatiques
* Michelin, Romain Seguy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -26,6 +27,7 @@
*/
package hudson.model;
import hudson.Functions;
import java.util.regex.Pattern;
import antlr.ANTLRException;
import hudson.AbortException;
......@@ -1729,7 +1731,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* Wipes out the workspace.
*/
public HttpResponse doDoWipeOutWorkspace() throws IOException, ServletException, InterruptedException {
checkPermission(BUILD);
checkPermission(Functions.isWipeOutPermissionEnabled() ? WIPEOUT : BUILD);
R b = getSomeBuildWithWorkspace();
FilePath ws = b!=null ? b.getWorkspace() : null;
if (ws!=null && getScm().processWorkspaceBeforeDeletion(this, ws, b.getBuiltOn())) {
......
......@@ -311,6 +311,12 @@ public class Hudson extends Jenkins {
* @deprecated only here for backward comp
*/
public static class CloudList extends Jenkins.CloudList {
// no op
public CloudList(Jenkins h) {
super(h);
}
public CloudList() {// needed for XStream deserialization
super();
}
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc.
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc.,
* Manufacture Francaise des Pneumatiques Michelin, Romain Seguy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -23,6 +24,7 @@
*/
package hudson.model;
import hudson.Functions;
import org.kohsuke.stapler.StaplerRequest;
import java.io.IOException;
......@@ -208,4 +210,5 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
public static final Permission EXTENDED_READ = new Permission(PERMISSIONS,"ExtendedRead", Messages._AbstractProject_ExtendedReadPermission_Description(), CONFIGURE, Boolean.getBoolean("hudson.security.ExtendedReadPermission"));
public static final Permission BUILD = new Permission(PERMISSIONS, "Build", Messages._AbstractProject_BuildPermission_Description(), Permission.UPDATE);
public static final Permission WORKSPACE = new Permission(PERMISSIONS, "Workspace", Messages._AbstractProject_WorkspacePermission_Description(), Permission.READ);
public static final Permission WIPEOUT = new Permission(PERMISSIONS, "WipeOut", Messages._AbstractProject_WipeOutPermission_Description(), null, Functions.isWipeOutPermissionEnabled());
}
......@@ -23,7 +23,17 @@
*/
package hudson.search;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import hudson.util.EditDistance;
import java.io.IOException;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.servlet.ServletException;
import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
......@@ -33,16 +43,6 @@ import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;
import org.kohsuke.stapler.export.Flavor;
import javax.servlet.ServletException;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import java.io.IOException;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Web-bound object that serves QuickSilver-like search requests.
*
......@@ -217,8 +217,10 @@ public class Search {
static final class TokenList {
private final String[] tokens;
private final static String[] EMPTY = new String[0];
public TokenList(String tokenList) {
tokens = tokenList.split("(?<=\\s)(?=\\S)");
tokens = tokenList!=null ? tokenList.split("(?<=\\s)(?=\\S)") : EMPTY;
}
public int length() { return tokens.length; }
......
......@@ -375,7 +375,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableItemGroup<TopLe
/**
* Active {@link Cloud}s.
*/
public final CloudList clouds = new CloudList(this);
public final Hudson.CloudList clouds = new Hudson.CloudList(this);
public static class CloudList extends DescribableList<Cloud,Descriptor<Cloud>> {
public CloudList(Jenkins h) {
......@@ -2136,7 +2136,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableItemGroup<TopLe
}
public Computer createComputer() {
return new MasterComputer();
return new Hudson.MasterComputer();
}
private synchronized TaskBuilder loadTasks() throws IOException {
......
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Erik Ramfelt, Tom Huybrechts, id:cactusman, Yahoo! Inc.
Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Erik Ramfelt,
Tom Huybrechts, id:cactusman, Yahoo! Inc., Manufacture Francaise des Pneumatiques
Michelin, Romain seguy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -39,7 +41,7 @@ THE SOFTWARE.
<l:task icon="images/24x24/search.png" href="${url}/" title="${%Status}" />
<l:task icon="images/24x24/notepad.png" href="${url}/changes" title="${%Changes}" />
<l:task icon="images/24x24/folder.png" href="${url}/ws/" title="${%Workspace}" permission="${it.WORKSPACE}">
<l:task icon="images/24x24/folder-delete.png" href="${url}/wipeOutWorkspace" title="${%Wipe Out Workspace}" permission="${it.BUILD}" />
<l:task icon="images/24x24/folder-delete.png" href="${url}/wipeOutWorkspace" title="${%Wipe Out Workspace}" permission="${h.isWipeOutPermissionEnabled() ? it.WIPEOUT : it.BUILD}" />
</l:task>
<j:if test="${it.configurable}">
<j:if test="${it.buildable}">
......
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
# Eric Lefevre-Ardant, Erik Ramfelt, Seiji Sogabe, id:cactusman, Romain Seguy
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
# Eric Lefevre-Ardant, Erik Ramfelt, Seiji Sogabe, id:cactusman,
# Manufacture Francaise des Pneumatiques Michelin, Romain Seguy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -53,6 +54,8 @@ AbstractProject.ExtendedReadPermission.Description=\
This permission grants read-only access to project configurations. Please be \
aware that sensitive information in your builds, such as passwords, will be \
exposed to a wider audience by granting this permission.
AbstractProject.WipeOutPermission.Description=\
This permission grants the ability to wipe out the contents of a workspace.
AbstractProject.AssignedLabelString.InvalidBooleanExpression=\
Invalid boolean expression: {0}
AbstractProject.AssignedLabelString.NoMatch=\
......
......@@ -2,7 +2,8 @@
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
Daniel Dyer, Seiji Sogabe, Tom Huybrechts
Daniel Dyer, Seiji Sogabe, Tom Huybrechts, Manufacture Francaise des Pneumatiques
Michelin, Romain Seguy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -259,7 +260,7 @@ THE SOFTWARE.
${%Page generated}:
<i:formatDate value="${h.getCurrentTime()}" type="both" dateStyle="medium" timeStyle="medium"/>
</span>
<a href="http://jenkins-ci.org/">Jenkins ver. ${h.version}</a>
<a href="${h.getFooterURL()}">Jenkins ver. ${h.version}</a>
</td></tr>
</table>
<j:forEach var="pd" items="${h.pageDecorators}">
......
jenkins (1.417) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
-- Kohsuke Kawaguchi <kk@kohsuke.org> Mon, 20 Jun 2011 11:00:42 -0700
jenkins (1.416) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin</artifactId>
......
......@@ -721,11 +721,10 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ AbstractBuild.class, TaskListener.class, String.class} );
opts = (String) expandMethod.invoke( null, this, listener, opts );
//opts = TokenMacro.expand(this, listener, opts);
//} catch (MacroEvaluationException e) {
// listener.error( "Ignore MacroEvaluationException " + e.getMessage() );
}
catch(Exception tokenException) {
listener.error("Ignore Problem expanding maven opts macros " + tokenException.getMessage());
//Token plugin not present. Ignore, this is OK.
//listener.error("Ignore Problem expanding maven opts macros " + tokenException.getMessage());
}
catch(LinkageError linkageError) {
// Token plugin not present. Ignore, this is OK.
......
......@@ -543,12 +543,10 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
Method expandMethod =
ReflectionUtils.findMethod(clazz, "expand", new Class[]{ AbstractBuild.class, TaskListener.class, String.class} );
opts = (String) expandMethod.invoke( null, this, listener, opts );
//opts = TokenMacro.expand(this, listener, opts);
//} catch (MacroEvaluationException e) {
// listener.error( "Ignore MacroEvaluationException " + e.getMessage() );
}
catch(Exception tokenException) {
listener.error("Ignore Problem expanding maven opts macros " + tokenException.getMessage());
//Token plugin not present. Ignore, this is OK.
//listener.error("Ignore Problem expanding maven opts macros " + tokenException.getMessage());
}
catch(LinkageError linkageError) {
// Token plugin not present. Ignore, this is OK.
......
......@@ -10,7 +10,7 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<name>Jenkins plugin POM</name>
<version>1.417-SNAPSHOT</version>
<version>1.419-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.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -43,25 +43,25 @@
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-war</artifactId>
<type>war</type>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>ui-samples-plugin</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
......
......@@ -32,7 +32,7 @@ THE SOFTWARE.
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Jenkins main module</name>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -109,7 +109,7 @@ public final class Capability implements Serializable {
static {
try {
PREAMBLE = "<===[HUDSON REMOTING CAPACITY]===>".getBytes("UTF-8");
PREAMBLE = "<===[JENKINS REMOTING CAPACITY]===>".getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<artifactId>pom</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jenkins-ci.main</groupId>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
</parent>
<artifactId>ui-samples-plugin</artifactId>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.417-SNAPSHOT</version>
<version>1.419-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -64,7 +64,7 @@ bindAuthenticator(BindAuthenticator2,initialDirContextFactory) {
authoritiesPopulator(AuthoritiesPopulatorImpl, initialDirContextFactory, instance.groupSearchBase) {
// see DefaultLdapAuthoritiesPopulator for other possible configurations
searchSubtree = true;
groupSearchFilter = "(| (member={0}) (uniqueMember={0}) (memberUid={0}))";
groupSearchFilter = "(| (member={0}) (uniqueMember={0}) (memberUid={1}))";
}
authenticationManager(ProviderManager) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册