duplicated stage NothingToDo ( by system |by Job)

This commit is contained in:
Roberto Cirillo 2022-04-22 16:00:25 +02:00
parent a6876bf091
commit 2563761860
1 changed files with 17 additions and 4 deletions

21
Jenkinsfile vendored
View File

@ -31,7 +31,7 @@ pipeline {
when{
allOf{
triggeredBy 'TimerTrigger'
environment name: 'IS_CRON', value: 'True'
environment name: 'IS_CRON', value: True
}
}
steps {
@ -46,20 +46,33 @@ pipeline {
}
}
}
stage('Nothing to do ') {
stage('Nothing to do by System ') {
when{
allOf{
triggeredBy 'TimerTrigger'
environment name: 'IS_CRON', value: 'False'
environment name: 'IS_CRON', value: False
}
}
steps {
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'
environment name: 'IS_CRON', value: True
anyOf{
triggeredBy 'BuildUpstreamCause'
triggeredBy 'UpstreamCause'