Skip to content
Permalink
Browse files
Merge pull request #7 from jglick/RunWrapper-help-JENKINS-38114
[JENKINS-38114] Consolidated help for RunWrapper
  • Loading branch information
jglick committed Sep 23, 2016
2 parents d3fb488 + 747178b commit bc5873391a3c4180d2a36ee837f78d19bad57f05
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</version>
</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</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(raw('''
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 bc58733

Please sign in to comment.