Skip to content

Commit 7a5b5de

Browse files
jlebonjbtrystram
authored andcommitted
jobs/release: support triggering build-node-image
We want the ability to trigger build-node-image from the release job instead of the latter being cron triggered. That way we reduce the chance of having compose skew when in pre-GA state, and we get fresh node images soon after the base image is updated. I had initially made the mechanism more generic, but meh, it didn't seem worth the complexity. We can always generalize it if another "follow-up trigger" case shows up.
1 parent ccc8c29 commit 7a5b5de

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

docs/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ streams:
6363
# is equivalent to listing all live artifacts and cloud platforms in
6464
# `skip_artifacts`.
6565
skip_disk_images: true
66+
# OPTIONAL: make the release job trigger build-node-image for the
67+
# following OCP releases once successful
68+
build_node_images: ["4.19-9.6"]
6669
stable:
6770
type: production
6871
# OPTIONAL: override cosa image to use for this stream

jobs/build-node-image.Jenkinsfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ node {
88
}
99

1010
properties([
11-
pipelineTriggers([cron('H H * * *')]),
1211
parameters([
1312
choice(name: 'RELEASE',
1413
choices: pipeutils.get_streams_choices(pipecfg, true),

jobs/release.Jenkinsfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ lock(resource: "release-${params.STREAM}", extra: locks) {
126126
""")
127127
}
128128

129+
def missing_arches = false
129130
def builtarches = shwrapCapture("""
130131
cosa shell -- cat builds/builds.json | \
131132
jq -r '.builds | map(select(.id == \"${params.VERSION}\"))[].arches[]'
@@ -135,6 +136,7 @@ lock(resource: "release-${params.STREAM}", extra: locks) {
135136
if (params.ALLOW_MISSING_ARCHES) {
136137
warn("Some requested architectures did not successfully build!")
137138
basearches = builtarches.intersect(basearches)
139+
missing_arches = true
138140
} else {
139141
echo "ERROR: Some requested architectures did not successfully build"
140142
echo "ERROR: Detected built architectures: $builtarches"
@@ -438,6 +440,15 @@ lock(resource: "release-${params.STREAM}", extra: locks) {
438440
}
439441
}
440442
}
443+
444+
if (!missing_arches && stream_info['build_node_images']) {
445+
for (release in stream_info['build_node_images']) {
446+
build job: 'build-node-image', wait: false, parameters: ([
447+
string(name: 'RELEASE', value: release)
448+
])
449+
}
450+
}
451+
441452
currentBuild.result = 'SUCCESS'
442453
currentBuild.description = "${build_description} ✓"
443454

0 commit comments

Comments
 (0)