Skip to content

Instantly share code, notes, and snippets.

@macg33zr
Last active November 27, 2016 15:38
Show Gist options
  • Save macg33zr/37299c56b41133b155c7e44248010046 to your computer and use it in GitHub Desktop.
Save macg33zr/37299c56b41133b155c7e44248010046 to your computer and use it in GitHub Desktop.
Pipeline model - multiple pipelines with processing outside the pipeline sections
// First pipeline declaration
pipeline {
// Run on any node
agent label: ""
stages {
stage('Section 1') {
steps {
echo "Section 1 pipeline"
// This will tie up a node. Look at executors while waiting.
input message: 'Wait for process', ok: 'Done waiting'
}
}
}
}
// This does not tie up a node. Look at executors while waiting.
stage('Approval') {
echo "Approval stage"
input message: 'Approve next section', ok: 'Approve'
}
// Second pipelne declaration
pipeline {
// Run on any node
agent label: ""
stages {
stage('Section 2') {
steps {
echo "Pipeline section 2"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment