summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-21 00:06:51 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-21 00:09:11 +0200
commit8e27b8cd147a5dfc77cc0842651b0c59efae6229 (patch)
tree92cbb7751ddd4e2d2cb2ce73bf509213d3a62ec6
parent8ccd3ebaf3db7097f1fc65e13451b7b7ed82f15c (diff)
downloadvyos-build-8e27b8cd147a5dfc77cc0842651b0c59efae6229.tar.gz
vyos-build-8e27b8cd147a5dfc77cc0842651b0c59efae6229.zip
Jenkins: improve when {} build conditions for timer and user builds
-rw-r--r--Jenkinsfile22
1 files changed, 14 insertions, 8 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index f307a6aa..dffc6e23 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -166,10 +166,13 @@ pipeline {
stages {
stage('Build ISO') {
when {
- not {
- // No need to trigger a full ISO build when only the Docker
- // container definition changes
- changeset "**/docker/*"
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ // Do not build full ISO build when Docker container changes
+ not { changeset "**/docker/*" }
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
}
}
steps {
@@ -190,10 +193,13 @@ pipeline {
}
stage('Test ISO') {
when {
- not {
- // No need to trigger a full ISO test when only the Docker
- // container definition changes
- changeset "**/docker/*"
+ beforeOptions true
+ beforeAgent true
+ anyOf {
+ // Do not build full ISO build when Docker container changes
+ not { changeset "**/docker/*" }
+ triggeredBy 'TimerTrigger'
+ triggeredBy cause: "UserIdCause"
}
}
steps {