Skip to content

Commit c2e8756

Browse files
committed
release: Run GC job only if gc-policy.yaml exists
Trigger the GC job only if gc-policy.yaml exists, which currently applies only to FCOS.
1 parent 8f45439 commit c2e8756

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

jobs/release.Jenkinsfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,14 @@ lock(resource: "release-${params.STREAM}", extra: locks) {
342342
}
343343
}
344344
}
345-
stage('Fork Garbage Collection') {
346-
build job: 'garbage-collection', wait: false, parameters: [
347-
string(name: 'STREAM', value: params.STREAM),
348-
booleanParam(name: 'DRY_RUN', value: false)
349-
]
345+
// Trigger the GC job only if `gc-policy.yaml` exists, which currently applies only to FCOS.
346+
if (pipeutils.load_gc()) {
347+
stage('Fork Garbage Collection') {
348+
build job: 'garbage-collection', wait: false, parameters: [
349+
string(name: 'STREAM', value: params.STREAM),
350+
booleanParam(name: 'DRY_RUN', value: false)
351+
]
352+
}
350353
}
351354
stage('Publish') {
352355
pipeutils.withAWSBuildUploadCredentials() {

0 commit comments

Comments
 (0)