Skip to content

Commit d9d5aa5

Browse files
authored
Update migrating-from-jenkins-to-github-actions.md (#493)
Fixes #395
1 parent 300a201 commit d9d5aa5

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

content/actions/learn-github-actions/migrating-from-jenkins-to-github-actions.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -232,25 +232,22 @@ Jenkins Pipeline
232232

233233
```yaml
234234
pipeline {
235-
agent none
236-
stages {
237-
stage('Run Tests') {
238-
parallel {
239-
stage('Test On MacOS') {
240-
agent { label "macos" }
241-
tools { nodejs "node-12" }
242-
steps {
243-
dir("scripts/myapp") {
244-
sh(script: "npm install -g bats")
245-
sh(script: "bats tests")
246-
}
247-
}
235+
agent none
236+
stages {
237+
stage('Run Tests') {
238+
matrix {
239+
axes {
240+
axis {
241+
name: 'PLATFORM'
242+
values: 'macos', 'linux'
248243
}
249-
stage('Test On Linux') {
250-
agent { label "linux" }
244+
}
245+
agent { label "${PLATFORM}" }
246+
stages {
247+
stage('test') {
251248
tools { nodejs "node-12" }
252249
steps {
253-
dir("script/myapp") {
250+
dir("scripts/myapp") {
254251
sh(script: "npm install -g bats")
255252
sh(script: "bats tests")
256253
}
@@ -259,6 +256,7 @@ pipeline {
259256
}
260257
}
261258
}
259+
}
262260
}
263261
```
264262

0 commit comments

Comments
 (0)