Skip to content

Instantly share code, notes, and snippets.

@chrisj-au
Last active November 27, 2020 00:05
Show Gist options
  • Save chrisj-au/cfebd47ec7d47c3cb5038a6bcb1ed48f to your computer and use it in GitHub Desktop.
Save chrisj-au/cfebd47ec7d47c3cb5038a6bcb1ed48f to your computer and use it in GitHub Desktop.
pre-load jenkins params for first build. Used where pipelines are created via code.
// Abort Build 1
if (env.BUILD_NUMBER.equals("1")) {
currentBuild.displayName = 'Parameter loading'
addBuildDescription('Please restart pipeline')
currentBuild.result = 'ABORTED'
error('Stopping initial manually triggered build as we only want to get the parameters')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment