From 8e27b8cd147a5dfc77cc0842651b0c59efae6229 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 21 Jun 2020 00:06:51 +0200 Subject: Jenkins: improve when {} build conditions for timer and user builds --- Jenkinsfile | 22 ++++++++++++++-------- 1 file 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 { -- cgit v1.2.3