File tree 1 file changed +14
-16
lines changed
content/actions/learn-github-actions
1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -232,25 +232,22 @@ Jenkins Pipeline
232
232
233
233
``` yaml
234
234
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'
248
243
}
249
- stage('Test On Linux') {
250
- agent { label "linux" }
244
+ }
245
+ agent { label "${PLATFORM}" }
246
+ stages {
247
+ stage('test') {
251
248
tools { nodejs "node-12" }
252
249
steps {
253
- dir("script /myapp") {
250
+ dir("scripts /myapp") {
254
251
sh(script : " npm install -g bats" )
255
252
sh(script : " bats tests" )
256
253
}
@@ -259,6 +256,7 @@ pipeline {
259
256
}
260
257
}
261
258
}
259
+ }
262
260
}
263
261
```
264
262
You can’t perform that action at this time.
0 commit comments