Created
May 3, 2020 17:22
-
-
Save avielb/b6eff6f3346b1c6a237dc098601bd5dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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