Skip to content

Commit

Permalink
feat(script stage): set a context value REPO_URL after starting a scr…
Browse files Browse the repository at this point in the history
…ipt job (#3267)

The current implementation of the SCRIPT stage using Jenkins requires that the remote URL of the script be set to something like mystashrepo/${REPO_URL}.

Jenkins currently returns the unprocessed remoteURL, and this value causes a SPEL warning when SPEL tries to resolve this value.

This fix will populate the REPO_URL value in the context, which allows the SPEL expression to evaluate and the warning to disappear
  • Loading branch information
tomaslin authored and emjburns committed Oct 30, 2019
1 parent 97366b9 commit 79db05a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class StartScriptTask implements Task {
}

String queuedBuild = buildService.build(master, job, parameters)
TaskResult.builder(ExecutionStatus.SUCCEEDED).context([master: master, job: job, queuedBuild: queuedBuild]).build()
TaskResult.builder(ExecutionStatus.SUCCEEDED).context([master: master, job: job, queuedBuild: queuedBuild, REPO_URL: repoUrl?:'default' ]).build()
}

}

0 comments on commit 79db05a

Please sign in to comment.