diff --git a/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md b/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md index d7c662b90dba..28a1e556e0f0 100644 --- a/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md +++ b/content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md @@ -232,25 +232,22 @@ Jenkins Pipeline ```yaml pipeline { - agent none - stages { - stage('Run Tests') { - parallel { - stage('Test On MacOS') { - agent { label "macos" } - tools { nodejs "node-12" } - steps { - dir("scripts/myapp") { - sh(script: "npm install -g bats") - sh(script: "bats tests") - } - } +agent none +stages { + stage('Run Tests') { + matrix { + axes { + axis { + name: 'PLATFORM' + values: 'macos', 'linux' } - stage('Test On Linux') { - agent { label "linux" } + } + agent { label "${PLATFORM}" } + stages { + stage('test') { tools { nodejs "node-12" } steps { - dir("script/myapp") { + dir("scripts/myapp") { sh(script: "npm install -g bats") sh(script: "bats tests") } @@ -259,6 +256,7 @@ pipeline { } } } +} } ```