update stages conditions

This commit is contained in:
Roberto Cirillo 2022-04-15 16:04:19 +02:00
parent 77d0ca7229
commit 770888e43d
1 changed files with 14 additions and 21 deletions

35
Jenkinsfile vendored
View File

@ -32,25 +32,10 @@ pipeline {
echo 'Deploy from system properly triggered' echo 'Deploy from system properly triggered'
} }
} }
stage('Add new pending deploy ') { stage('Nothing to do ') {
when{ when{
allOf{ allOf{
not { triggeredBy 'TimerTrigger'
triggeredBy 'TimerTrigger'
}
environment name: 'IS_CRON', value: 'True'
}
}
steps {
echo 'New deploy of ${job} appended to the deploy file'
}
}
stage('Nothing to do ') {
when{
allOf{
not {
triggeredBy 'TimerTrigger'
}
environment name: 'IS_CRON', value: 'False' environment name: 'IS_CRON', value: 'False'
} }
} }
@ -58,13 +43,21 @@ pipeline {
echo 'Do Nothing: cron disabled on agent' echo 'Do Nothing: cron disabled on agent'
} }
} }
stage('Add new pending deploy ') {
when{
allOf{
triggeredBy 'BuildUpstreamCause'
environment name: 'IS_CRON', value: 'True'
}
}
steps {
echo 'New deploy of ${job} appended to the deploy file'
}
}
stage('Deploy from job ') { stage('Deploy from job ') {
when{ when{
allOf{ allOf{
not { triggeredBy 'BuildUpstreamCause'
triggeredBy 'BuildUpstreamCause'
}
environment name: 'IS_CRON', value: 'False' environment name: 'IS_CRON', value: 'False'
} }
} }