Skip to content

Commit 7509de6

Browse files
committed
[Build] Define cron-trigger for DockerImagesBuild in Job definition
The triggers defined in a Jenkins-pipeline are only applied to the Job-configuration after the first execution of the pipeline. This has the consequence that after each execution of the seed job the configuration of the 'DockerImagesBuild' is reset to have no triggers and consequently it would require a manual execution of that job to restore the cron-trigger each execution of the seed job.
1 parent ddfc934 commit 7509de6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

JenkinsJobs/Builds/DockerImagesBuild.jenkinsfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ pipeline {
66
buildDiscarder(logRotator(numToKeepStr:'5'))
77
disableConcurrentBuilds(abortPrevious: true)
88
}
9-
triggers {
10-
cron '@weekly'
11-
}
129
agent {
1310
label 'docker-build'
1411
}

JenkinsJobs/Builds/FOLDER.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ folder('Builds') {
44

55
pipelineJob('Builds/Build-Docker-images'){
66
description('Build and publish custom Docker images')
7+
properties {
8+
pipelineTriggers {
9+
triggers {
10+
cron { spec('@weekly') }
11+
}
12+
}
13+
}
714
definition {
815
cpsScm {
916
lightweight(true)

0 commit comments

Comments
 (0)