Skip to content

Commit

Permalink
Merge branch 'master' into extensionlist-listener
Browse files Browse the repository at this point in the history
* master: (61 commits)
  [JENKINS-28384] Noting merge of #1700.
  update changelog: PR 1682 -> issue 28233, fix markup issue
  Remove duplicated 1.613 section from changelog
  [FIXED JENKINS-28384] NPE when Node.toComputer → null.
  Refactor fingerprint classes: Javadoc and annotations
  fixup ce747f9
  Refactor ArgumentListBuilder#toWindowsCommand
  Improve ArgumentListBuilder#toWindowsCommand test coverage
  Forgotten @test annotation
  updated changelog for release
  updated changelog for release
  [maven-release-plugin] prepare release jenkins-1.613
  [maven-release-plugin] prepare for next development iteration
  Report launcher exited before establishing the channel
  Remove erroneous '+ ' from log message.
  Increase visibility of Java 7 requirement
  Expose SlaveComputer#getLogDir() explicitly
  [FIXED JENKINS-28227] Switch to Enblish locale in RunTest#getDurationString to test messages.
  Noting #1591
  Noting #1682
  ...
  • Loading branch information
tfennelly committed May 15, 2015
2 parents 30ece5f + 98a6c6f commit 2c6bc73
Show file tree
Hide file tree
Showing 56 changed files with 1,327 additions and 145 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,3 @@
# Contributing to Jenkins
For information on contributing to Jenkins, check out the https://wiki.jenkins-ci.org/display/JENKINS/contributing and https://wiki.jenkins-ci.org/display/JENKINS/Extend+Jenkins wiki pages over at the official https://wiki.jenkins-ci.org . They will help you get started with contributing to Jenkins.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ Non-source downloads such as WAR files and several Linux packages can be found o
Our latest and greatest source of Jenkins CI can be found on [GitHub]. Fork us!

# Contributing to Jenkins
For information on contributing to Jenkins, check out the [Contributing] and [Extend Jenkins] wiki pages over at the official [wiki]. They will help you get started with contributing to Jenkins.
Follow [contributing](CONTRIBUTING.md) file.

# News and Website
All information about Jenkins CI can be found on our [website]. Follow us on Twitter [@jenkinsci].
Expand Down
45 changes: 41 additions & 4 deletions changelog.html
Expand Up @@ -39,11 +39,11 @@
Help other Jenkins users by letting the community know which releases you've used,
and whether they had any significant issues. <br>
Legend: <br>
<img src="http://ci.jenkins-ci.org/images/16x16/health-80plus.gif" width="16" height="16"
<img src="//ci.jenkins-ci.org/images/16x16/health-80plus.gif" width="16" height="16"
alt="Sunny"> = I use it on my production site without major issues. <br>
<img src="http://ci.jenkins-ci.org/images/16x16/health-40to59.gif" width="16" height="16"
<img src="//ci.jenkins-ci.org/images/16x16/health-40to59.gif" width="16" height="16"
alt="Cloudy"> = I don't recommend it. <br>
<img src="http://ci.jenkins-ci.org/images/16x16/health-00to19.gif" width="16" height="16"
<img src="//ci.jenkins-ci.org/images/16x16/health-00to19.gif" width="16" height="16"
alt="Lightning"> = I tried it but rolled back to a previous version. <br>
View ratings below, and click one of the icons next to your version to provide your input.
</div>
Expand All @@ -55,6 +55,44 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
<code>NullPointerException</code> computing load statistics under some conditions.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-28384">issue 28384</a>)
<li class=bug>
Plugins using class loader masking did not work properly over the slave channel.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-27289">issue 27289</a>)
</ul>
</div><!--=TRUNK-END=-->
<h3><a name=v1.613>What's new in 1.613</a> (2015/05/10)</h3>
<ul class=image>
<li class=bug>
Update bundled LDAP plugin in order to restore missing help files
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-28233">issue 28233</a>)
<li class=bug>
hudson.model.Run.getLog() throws IndexOutOfBoundsException when called with maxLines=0
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-27441">issue 27441</a>)
</ul>
<h3><a name=v1.612>What's new in 1.612</a> (2015/05/03)</h3>
<ul class=image>
<li class=rfe>
<strong>Jenkins now requires Java 7</strong>.
(<a href="http://jenkins-ci.org/content/good-bye-java6">announcement</a>,
<a href="https://issues.jenkins-ci.org/browse/JENKINS-28120">issue 28120</a>)
<li class=bug>
Handle AbortException publisher status in the same way as deprecated false boolean status
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-26964">issue 26964</a>)
<li class=bug>
Ensures GlobalSettingsProvider does not swallow fatal exceptions
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-26604">issue 26604</a>)
<li class=rfe>
add datestamp to node-offline message
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23917">issue 23917</a>)
<li class=rfe>
Larger minimum popup menu height.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-27067">issue 27067</a>)
<li class=bug>
<code>Descriptor.getId</code> fix in 1.610 introduced regressions affecting at least the Performance and NodeJS plugins.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-28093">issue 28093</a> and <a href="https://issues.jenkins-ci.org/browse/JENKINS-28110">issue 28110</a>)
<li class=bug>
Under rare conditions Executor.getProgress() can throw a Division by zero exception.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-28115">issue 28115</a>)
Expand All @@ -63,7 +101,6 @@
configured JVM options.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-28111">issue 28111</a>)
</ul>
</div><!--=TRUNK-END=-->
<h3><a name=v1.611>What's new in 1.611</a> (2015/04/26)</h3>
<ul class=image>
<li class=bug>
Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.612-SNAPSHOT</version>
<version>1.614-SNAPSHOT</version>
</parent>

<artifactId>cli</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.612-SNAPSHOT</version>
<version>1.614-SNAPSHOT</version>
</parent>

<artifactId>jenkins-core</artifactId>
Expand Down Expand Up @@ -749,7 +749,7 @@ THE SOFTWARE.
<configuration>
<forkCount>0.5C</forkCount>
<reuseForks>true</reuseForks>
<argLine>-XX:MaxPermSize=128m</argLine>
<argLine>-XX:MaxPermSize=128m -noverify</argLine> <!-- some versions of JDK7/8 causes VerifyError during mock tests: http://code.google.com/p/powermock/issues/detail?id=504 -->
</configuration>
</plugin>
<plugin><!-- set main class -->
Expand Down
21 changes: 18 additions & 3 deletions core/src/main/java/hudson/model/AbstractBuild.java
Expand Up @@ -715,6 +715,8 @@ protected final void performAllBuildStep(BuildListener listener, Iterable<? exte
*
* @param phase
* true for the post build processing, and false for the final "run after finished" execution.
*
* @return false if any build step failed
*/
protected final boolean performAllBuildSteps(BuildListener listener, Iterable<? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException {
boolean r = true;
Expand All @@ -724,20 +726,33 @@ protected final boolean performAllBuildSteps(BuildListener listener, Iterable<?
if (!perform(bs,listener)) {
LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, bs});
r = false;
if (phase) {
setResult(Result.FAILURE);
}
}
} catch (Exception e) {
reportError(bs, e, listener, phase);
r = false;
} catch (LinkageError e) {
reportError(bs, e, listener, phase);
r = false;
}
}
return r;
}

private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) {
String msg = "Publisher " + bs.getClass().getName() + " aborted due to exception";
e.printStackTrace(listener.error(msg));
LOGGER.log(WARNING, msg, e);
final String publisher = ((Publisher) bs).getDescriptor().getDisplayName();

if (e instanceof AbortException) {
LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, publisher});
listener.error("Publisher '" + publisher + "' failed: " + e.getMessage());
} else {
String msg = "Publisher '" + publisher + "' aborted due to exception: ";
e.printStackTrace(listener.error(msg));
LOGGER.log(WARNING, msg, e);
}

if (phase) {
setResult(Result.FAILURE);
}
Expand Down
17 changes: 14 additions & 3 deletions core/src/main/java/hudson/model/Computer.java
Expand Up @@ -271,14 +271,25 @@ public void addAction(Action a) {
/**
* This is where the log from the remote agent goes.
* The method also creates a log directory if required.
* @see #relocateOldLogs()
* @see #getLogDir(), #relocateOldLogs()
*/
public File getLogFile() {
public @Nonnull File getLogFile() {
return new File(getLogDir(),"slave.log");
}

/**
* Directory where rotated slave logs are stored.
*
* The method also creates a log directory if required.
*
* @since 1.613
*/
protected @Nonnull File getLogDir() {
File dir = new File(Jenkins.getInstance().getRootDir(),"logs/slaves/"+nodeName);
if (!dir.exists() && !dir.mkdirs()) {
LOGGER.severe("Failed to create slave log directory " + dir.getAbsolutePath());
}
return new File(dir,"slave.log");
return dir;
}

/**
Expand Down
20 changes: 16 additions & 4 deletions core/src/main/java/hudson/model/Descriptor.java
Expand Up @@ -918,17 +918,29 @@ List<T> newInstancesFromHeteroList(StaplerRequest req, Object formData,
// Descriptors, so we prefer 'kind' if it's present.
String kind = jo.optString("kind", null);
if (kind != null) {
// Only applies when Descriptor.getId is overridden.
// Note that kind is only supported here,
// *not* inside the StaplerRequest.bindJSON which is normally called by newInstance
// (since Descriptor.newInstance is not itself available to Stapler).
// If you merely override getId for some reason, but use @DataBoundConstructor on your Describable,
// there is no problem; but you can only rely on newInstance being called at top level.
d = findById(descriptors, kind);
}
if (d == null) {
kind = jo.getString("$class");
d = findByDescribableClassName(descriptors, kind);
if (d == null) d = findByClassName(descriptors, kind);
kind = jo.optString("$class");
if (kind != null) { // else we will fall through to the warning
// This is the normal case.
d = findByDescribableClassName(descriptors, kind);
if (d == null) {
// Deprecated system where stapler-class was the Descriptor class name (rather than Describable class name).
d = findByClassName(descriptors, kind);
}
}
}
if (d != null) {
items.add(d.newInstance(req, jo));
} else {
LOGGER.warning("Received unexpected formData for descriptor " + kind);
LOGGER.log(Level.WARNING, "Received unexpected form data element: {0}", jo);
}
}
}
Expand Down

0 comments on commit 2c6bc73

Please sign in to comment.