Skip to content

Commit

Permalink
Ensure target is reset before loading a jdk pipeline config file
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Aug 11, 2023
1 parent 798ffa9 commit 372cdfd
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions pipelines/build/regeneration/build_pipeline_generator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,8 @@ node('worker') {
config.put('disableJob', target.disableJob)
}

if (enablePipelineSchedule.toBoolean()) {
try {
config.put('pipelineSchedule', target.triggerSchedule_nightly)
} catch (Exception ex) {
config.put('pipelineSchedule', '0 0 31 2 0') // 31st Feb, so will never run
}
if (enablePipelineSchedule.toBoolean() && target.hasProperty('triggerSchedule_nightly')) {
config.put('pipelineSchedule', target.triggerSchedule_nightly)
}

if (useAdoptShellScripts.toBoolean()) {
Expand Down Expand Up @@ -252,12 +248,8 @@ node('worker') {
// Load weeklyTemplatePath. This is where the weekly_release_pipeline_job_template.groovy code is located compared to the repository root. This actually sets up the weekly pipeline job using the parameters above.
def weeklyTemplatePath = (params.WEEKLY_TEMPLATE_PATH) ?: DEFAULTS_JSON['templateDirectories']['weekly']

if (enablePipelineSchedule.toBoolean()) {
try {
config.put('pipelineSchedule', target.triggerSchedule_weekly)
} catch (Exception ex) {
config.put('pipelineSchedule', '0 0 31 2 0') // 31st Feb, so will never run
}
if (enablePipelineSchedule.toBoolean() && target.hasProperty('triggerSchedule_weekly')) {
config.put('pipelineSchedule', target.triggerSchedule_weekly)
}
config.releaseType = "Weekly"

Expand Down

0 comments on commit 372cdfd

Please sign in to comment.