From 8ce6030d034a3360917703b50f0b27173f1ada96 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Fri, 27 Apr 2018 11:24:15 +0200 Subject: [PATCH] [Jenkins] Doing a full build when user started the build. See https://stackoverflow.com/questions/46908390 --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5fc6bb72f0a..7e3cda37884 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,14 @@ pipeline { stage_required.full = true return true } + def causes = currentBuild.rawBuild.getCauses() + for(cause in causes) { + if (cause.class.toString().contains("UserIdCause")) { + echo "Doing full build because job was started by user." + stage_required.full = true + return true + } + } if (env.JOB_NAME == "ufz/ogs/master") { stage_required.web = true } -- GitLab