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 44a9096 commit c392bda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipelines/build/regeneration/build_pipeline_generator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ node('worker') {
config.put('targetConfigurations', target.targetConfigurations)

// Set disableJob if in target
if (target.hasProperty('target.disableJob')) {
if (target.metaClass.hasProperty(target, 'disableJob')) {
config.put('disableJob', target.disableJob)
}

if (enablePipelineSchedule.toBoolean() && target.hasProperty('triggerSchedule_nightly')) {
if (enablePipelineSchedule.toBoolean() && target.metaClass.hasProperty(target, 'triggerSchedule_nightly')) {
config.put('pipelineSchedule', target.triggerSchedule_nightly)
}

Expand Down Expand Up @@ -249,7 +249,7 @@ 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() && target.hasProperty('triggerSchedule_weekly')) {
if (enablePipelineSchedule.toBoolean() && target.metaClass.hasProperty(target, 'triggerSchedule_weekly')) {
config.put('pipelineSchedule', target.triggerSchedule_weekly)
}
config.releaseType = "Weekly"
Expand Down

0 comments on commit c392bda

Please sign in to comment.