Skip to content

Instantly share code, notes, and snippets.

@secf4ult
Created April 8, 2024 12:26
Show Gist options
  • Save secf4ult/e7650a6ddca601d48ec811f69e47640d to your computer and use it in GitHub Desktop.
Save secf4ult/e7650a6ddca601d48ec811f69e47640d to your computer and use it in GitHub Desktop.
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