Skip to content
Permalink
Browse files
[JENKINS-38114] Consolidated help for RunWrapper.
  • Loading branch information
jglick committed Sep 22, 2016
1 parent d3fb488 commit 7b9d1347db63db04fb86970e62d11ed0399c60ae
31 pom.xml
@@ -4,8 +4,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.5</version>
<relativePath />
<version>2.15</version>
<relativePath/>
</parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>pipeline-build-step</artifactId>
@@ -28,65 +28,70 @@
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<jenkins.version>1.642.3</jenkins.version>
<jenkins-test-harness.version>2.12</jenkins-test-harness.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>1.15</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>1.15</version>
<version>2.6-SNAPSHOT</version> <!-- TODO https://github.com/jenkinsci/workflow-support-plugin/pull/13 -->
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>1.15</version>
<version>2.3</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>1.15</version>
<version>2.6-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>1.15</version>
<version>2.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>1.15</version>
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>1.15</version>
<version>2.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -0,0 +1,10 @@
p('''
You may ask that this Pipeline build wait for completion of the downstream build.
In that case the return value of the step is an object on which you can obtain the following read-only properties:
so you can inspect its <code>result</code> and so on.
''')
raw(org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper.class.getResource("RunWrapper/help.html").text)
p('''
If you do not wait, this step succeeds so long as the downstream build can be added to the queue (it will not even have been started).
In that case there is currently no return value.
''')

This file was deleted.

@@ -24,10 +24,12 @@

package org.jenkinsci.plugins.workflow.support.steps.build;

import java.util.concurrent.Callable;
import static org.hamcrest.Matchers.containsString;
import org.jenkinsci.plugins.workflow.steps.StepConfigTester;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;

@@ -51,4 +53,13 @@ public class BuildTriggerStepConfigTest {
assertEquals(Integer.valueOf(0), s.getQuietPeriod());
}

@Issue("JENKINS-38114")
@Test public void helpWait() throws Exception {
assertThat(r.createWebClient().goTo(r.executeOnServer(new Callable<String>() {
@Override public String call() throws Exception {
return r.jenkins.getDescriptorByType(BuildTriggerStep.DescriptorImpl.class).getHelpFile("wait");
}
}).replaceFirst("^/", ""), /* TODO why is no content type set? */null).getWebResponse().getContentAsString(), containsString("<dt><code>buildVariables</code></dt>"));
}

}

0 comments on commit 7b9d134

Please sign in to comment.