Skip to content

Instantly share code, notes, and snippets.

@cowlinator
Last active June 10, 2024 20:47
Show Gist options
  • Save cowlinator/2c313de4ae67b06d6768c1f28331b163 to your computer and use it in GitHub Desktop.
Save cowlinator/2c313de4ae67b06d6768c1f28331b163 to your computer and use it in GitHub Desktop.
jenk hasVariable (keep me)
pipeline {
agent none
stages {
stage('stage') {
steps {
script {
if (binding.hasVariable('superVariable')) {
echo("superVariable == 0: ")
echo(superVariable == 0)
}
else {
echo("no var")
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment