Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

(included from generic page?)

...

See Parallel stages with Declarative Pipeline 1.2 (jenkins.io)

Defining Parallel Stages in Jenkins Pipeline

Something Something

Code Block
pipeline {
    agent none
    stages {
        stage('Run Tests') {
            parallel {
                stage('Test On Windows') {
                    agent {
                        label "windows"
                    }
                    steps {
                        bat "run-tests.bat"
                    }
                    post {
                        always {
                            junit "**/TEST-*.xml"
                        }
                    }
                }
                stage('Test On Linux') {
                    agent {
                        label "linux"
                    }
                    steps {
                        sh "run-tests.sh"
                    }
                    post {
                        always {
                            junit "**/TEST-*.xml"
                        }
                    }
                }
            }
        }
    }
}

...