Skip to content

Instantly share code, notes, and snippets.

@avielb
Created May 3, 2020 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avielb/b6eff6f3346b1c6a237dc098601bd5dc to your computer and use it in GitHub Desktop.
Save avielb/b6eff6f3346b1c6a237dc098601bd5dc to your computer and use it in GitHub Desktop.
properties([parameters([string(defaultValue: 'aviel', description: 'what is your name?', name: 'NAME', trim: false), booleanParam(defaultValue: false, description: 'or not to be?', name: 'to_be'), password(defaultValue: '', description: 'enter the secret ', name: 'SECRET'), choice(choices: ['option_1', 'option_2', 'option_3'], description: 'choose an option!', name: 'my_choice')]), pipelineTriggers([cron('*/2 * * * *')])])
my_name = "Blabla"
def getStartBanner () {
return '''******************
* START *
******************'''
}
node {
timestamps {
stage("0"){
echo getStartBanner()
echo params.NAME
echo params.to_be.toString()
echo params.SECRET.toString()
echo params.my_choice
}
stage("1"){
if(params.NAME == "aviel"){
echo "Found you!"
} else {
echo "Where are you?"
}
}
stage("2"){
echo "second stage"
}
stage("3"){
echo "third stage"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment