Skip to content

Instantly share code, notes, and snippets.

@mryan43
Created June 28, 2017 20:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mryan43/a823a57d91f49afb989155c7decbe6be to your computer and use it in GitHub Desktop.
Save mryan43/a823a57d91f49afb989155c7decbe6be to your computer and use it in GitHub Desktop.
scripted pipeline version of https://stackoverflow.com/questions/42561241
node('yona'){
stage('Build'){
...
}
}
stage('Decide tag on Docker Hub'){
env.TAG_ON_DOCKER_HUB = input message: 'User input required',
parameters: [choice(name: 'Tag on Docker Hub', choices: 'no\nyes', description: 'Choose "yes" if you want to deploy this build')]
}
if (env.TAG_ON_DOCKER_HUB == 'yes'){
node('yona'){
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment