From a6d9a0c23a6899cd7548d5a391e599a36957be26 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Sun, 17 Jul 2022 20:20:21 -0400 Subject: [PATCH] Move startedBy* to pipeline-lib. Signed-off-by: Brian J. Murrell --- vars/startedByTimer.groovy | 13 ------------- vars/startedByUser.groovy | 13 ------------- 2 files changed, 26 deletions(-) delete mode 100644 vars/startedByTimer.groovy delete mode 100644 vars/startedByUser.groovy diff --git a/vars/startedByTimer.groovy b/vars/startedByTimer.groovy deleted file mode 100644 index 05f3870..0000000 --- a/vars/startedByTimer.groovy +++ /dev/null @@ -1,13 +0,0 @@ -// vars/startedByTimer.groovy - -/** - * Return True the build was started by a timer - * - * This needs to be here rather than in pipeline-lib or Jenkinsfile due to - * Scripts not permitted to use method net.sf.json.JSON isEmpty. - */ -Boolean call(Map config = [:]) { - - return !currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').isEmpty() - -} diff --git a/vars/startedByUser.groovy b/vars/startedByUser.groovy deleted file mode 100644 index ad6993c..0000000 --- a/vars/startedByUser.groovy +++ /dev/null @@ -1,13 +0,0 @@ -// vars/startedByTimer.groovy - -/** - * Return True if the build was caused by a User (I.e. Build Now) - * - * This needs to be here rather than in pipeline-lib or Jenkinsfile due to - * Scripts not permitted to use method net.sf.json.JSON isEmpty. - */ -Boolean call(Map config = [:]) { - - return !currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause').isEmpty() - -}