Created
April 8, 2024 12:26
-
-
Save secf4ult/e7650a6ddca601d48ec811f69e47640d 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
pipeline { | |
agent any | |
parameters { | |
string(name: "myStringParam", description: "String Parameter") | |
choice(choices: ["Choice 1", "Choice 2"], name: "myChoiceParam", description: "Choice Parameter") | |
booleanParam(defaultValue: false, name: "myBooleanParam", description: "Boolean Parameter") | |
} | |
environment { | |
def myString = "myString" | |
def myNum = 10 | |
def myBool = true | |
} | |
stages { | |
stage("Demo") { | |
steps { | |
echo "${params.myStringParam} ${params.myChoiceParam} ${params.myBooleanParam}" | |
echo "${myString} ${myNum} ${myBool}" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment