Skip to content

Commit 2897308

Browse files
committed
Use anyOf for simplicity
1 parent 0bb8f2c commit 2897308

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

Jenkinsfile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ pipeline {
1919
stages {
2020
stage('Build and Package') {
2121
when {
22+
anyOf {
2223
branch "main";
24+
branch "main-nan-testing";
25+
}
2326
}
2427
steps {
2528
script {
@@ -34,23 +37,10 @@ pipeline {
3437
}
3538
stage('Deploy staging') {
3639
when {
40+
anyOf {
3741
branch "main";
38-
}
39-
steps {
40-
script {
41-
indicator_list.each { indicator ->
42-
deploy_staging[indicator] = {
43-
sh "jenkins/deploy-staging.sh ${indicator}"
44-
}
45-
}
46-
parallel deploy_staging
47-
}
48-
sh "jenkins/deploy-staging-api-match-list.sh"
49-
}
50-
}
51-
stage('Deploy staging [main-nan-testing]') {
52-
when {
5342
branch "main-nan-testing";
43+
}
5444
}
5545
steps {
5646
script {
@@ -61,6 +51,7 @@ pipeline {
6151
}
6252
parallel deploy_staging
6353
}
54+
sh "jenkins/deploy-staging-api-match-list.sh"
6455
}
6556
}
6657
stage('Deploy production') {

0 commit comments

Comments
 (0)