diff --git a/Jenkinsfile b/Jenkinsfile index 78026e8..f12b451 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,9 +45,28 @@ pipeline { echo 'New deploy of ${job} appended to the deploy file' } } + stage('Check Agent configuration for automatic builds ') { + when{ + allOf{ + not { + triggeredBy 'TimerTrigger' + } + environment name: 'IS_CRON', value: 'False' + } + } + steps { + echo 'Do Nothing: cron disabled on agent' + } + } + stage('Deploy from job ') { when{ - environment name: 'IS_CRON', value: 'False' + allOf{ + not { + triggeredBy 'BuildUpstreamCause' + } + environment name: 'IS_CRON', value: 'False' + } } steps { echo 'New deploy of ${job} appended to the deploy file'