Skip to content

Instantly share code, notes, and snippets.

@adamtaylor
Created April 4, 2019 22:05
Show Gist options
  • Save adamtaylor/ad58f1f350bb00e81a36ad3fa992c4bd to your computer and use it in GitHub Desktop.
Save adamtaylor/ad58f1f350bb00e81a36ad3fa992c4bd to your computer and use it in GitHub Desktop.
Jenkinsfile with nested states
pipeline {
agent any
stages {
stage('Tests') {
stages {
stage('Compilation') {
steps {
sh 'make test > test_results.xml || true'
junit 'test_results.xml'
}
}
stage('Unit Tests') {
steps {
sh 'make test > test_results.xml || true'
junit 'test_results.xml'
}
}
stage('Integration Tests') {
steps {
sh 'make test > test_results.xml || true'
junit 'test_results.xml'
}
}
stage('Static Analysis Tests') {
steps {
sh 'make test > test_results.xml || true'
junit 'test_results.xml'
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment