From 52d802c6b33ca41d6f295d8f9da314cae8f4af2e Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 26 Apr 2022 14:49:16 +0200 Subject: [PATCH] set trigger every 15' --- Jenkinsfile | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c79f6b8..35aaed4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,8 +16,10 @@ pipeline { label 'CD' } triggers { +// every fifteen minutes (perhaps at :07, :22, :37, :52) + cron('H/15 * * * *') // once a day on the 1st and 15th of every month - cron 'H H 1,15 * *' +// cron ('H H 1,15 * *') } //once in every two hours slot between 9 AM and 5 PM every weekday (perhaps at 10:38 AM, 12:38 PM, 2:38 PM, 4:38 PM) // cron('H H(9-16)/2 * * 1-5') @@ -41,6 +43,7 @@ pipeline { when{ allOf{ triggeredBy 'TimerTrigger' + // maybe we can add a new condition in order to consider the manual execution of this pipeline environment name: 'IS_CRON', value: 'True' } } @@ -67,18 +70,6 @@ pipeline { echo 'Do Nothing: cron build disabled' } } - stage('Nothing to do by Job ') { - when{ - environment name: 'IS_CRON', value: 'True' - anyOf{ - triggeredBy 'BuildUpstreamCause' - triggeredBy 'UpstreamCause' - } - } - steps { - echo 'Do Nothing: cron build disabled' - } - } stage('Add new pending deploy ') { when{ environment name: 'IS_CRON', value: 'True'