Skip to content

Instantly share code, notes, and snippets.

@ssbostan
Created June 23, 2023 07:30
Show Gist options
  • Save ssbostan/396d9782d1f8a3d48345cf9b7e3e8056 to your computer and use it in GitHub Desktop.
Save ssbostan/396d9782d1f8a3d48345cf9b7e3e8056 to your computer and use it in GitHub Desktop.
Jenkins pipeline syntax reference
pipeline {
agent any
stages {
stage("Test") {
when {
beforeAgent true
beforeInput true
beforeOptions true
// Write your conditions here. For example:
equals(actual: currentBuild.number, expected: 1)
}
steps {
echo "Hello World!"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment