Skip to content

Commit

Permalink
jobs/kola-upgrade: set target_version based on target stream
Browse files Browse the repository at this point in the history
Since we can have a different start stream versus target stream,
here we need to pick up the target version from the target stream's
`builds.json`, not the start stream's `builds.json`.
  • Loading branch information
dustymabe authored and jlebon committed Apr 3, 2023
1 parent e6b9cac commit d5b1a0e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions jobs/kola-upgrade.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ lock(resource: "kola-upgrade-${params.ARCH}") {
timeout(time: 90, unit: 'MINUTES') {
try {

// Determine the target version. If no params.TARGET_VERSION was
// specified then it will be the latest in the params.STREAM.
if (target_version == '') {
target_version = shwrapCapture("""
curl -L https://builds.coreos.fedoraproject.org/prod/streams/${params.STREAM}/builds/builds.json | \
jq -r .builds[0].id
""")
}
echo "Selected ${target_version} as the target version to test"
// Determine the start version based on the provided params.START_VERSION
// and the releases.json for this stream. The user can provide a full
// version, the empty string (implies earliest available), or two digits
Expand Down Expand Up @@ -143,12 +152,6 @@ lock(resource: "kola-upgrade-${params.ARCH}") {
cosa buildfetch --artifact=qemu --stream=${start_stream} --build=${start_version} --arch=${params.ARCH}
cosa decompress --build=${start_version}
""")

// If no target version was specified the target will be the latest build
if (target_version == '') {
target_version = shwrapCapture("cosa shell -- jq -r .builds[0].id builds/builds.json")
currentBuild.description = "[${params.STREAM}][${params.ARCH}] - ${start_version}->${target_version}"
}
}

// A few independent tasks that can be run in parallel
Expand Down

0 comments on commit d5b1a0e

Please sign in to comment.