Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED JENKINS-31576] Add currentBuild.upstreamBuilds #49

Merged
merged 1 commit into from Jan 4, 2018

Conversation

Projects
None yet
2 participants
@abayer
Copy link
Member

commented Dec 18, 2017

@abayer abayer requested review from jglick, rsandell and svanoort Dec 18, 2017

@jglick

jglick approved these changes Dec 21, 2017

Copy link
Member

left a comment

Fine enough though this will not scale.

first.setDefinition(new CpsFlowDefinition("build job: 'second-job'\n", true));
second.setDefinition(new CpsFlowDefinition("build job: 'third-job'\n", true));
third.setDefinition(new CpsFlowDefinition("currentBuild.upstreamBuilds?.each { b ->\n" +
" echo \"b: ${b.getFullDisplayName()}\"\n" +

This comment has been minimized.

Copy link
@jglick

jglick Dec 21, 2017

Member

or just

echo(/b: $b.fullDisplayName/)
WorkflowRun thirdRun = third.getBuildByNumber(1);
r.j.assertBuildStatusSuccess(thirdRun);

r.j.assertLogContains("b: " + firstRun.getFullDisplayName(), thirdRun);

This comment has been minimized.

Copy link
@jglick

jglick Dec 21, 2017

Member

i.e., first-job #1

r.j.assertBuildStatusSuccess(thirdRun);

r.j.assertLogContains("b: " + firstRun.getFullDisplayName(), thirdRun);
r.j.assertLogContains("b: " + secondRun.getFullDisplayName(), thirdRun);

This comment has been minimized.

Copy link
@jglick

jglick Dec 21, 2017

Member

i.e., second-job #1

@abayer abayer merged commit da2ca81 into jenkinsci:master Jan 4, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.