From 250be82cd871e7f44d42f4f5da69ba42952b4f2d Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Thu, 3 Mar 2022 16:22:07 +0100 Subject: [PATCH] jenkins/images: find channel from base channel variable Using the tags on the branch is not enough to find the channel we want to be the dev build be related to. Use the base channel variable which was introduced for this. --- jenkins/images.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jenkins/images.sh b/jenkins/images.sh index 8061f44f2c..b253702054 100755 --- a/jenkins/images.sh +++ b/jenkins/images.sh @@ -133,20 +133,19 @@ set +x set +e echo "===================================================================" echo -# Get last release tag (and filter out the alpha-3046.0.0 tag which was done without updating the submodule and thus refers a commit on main) -PREV_TAG=$(git -C src/scripts describe --tags --abbrev=0 | sed 's/alpha-3046.0.0//g') -if [ "${PREV_TAG}" = "" ]; then - # For main we compare to last alpha release - export CHANNEL_A="alpha" - export VERSION_A=$(curl -s -S -f -L "https://${CHANNEL_A}.release.flatcar-linux.net/${BOARD}/current/version.txt" | grep -m 1 "FLATCAR_VERSION=" | cut -d "=" -f 2) +if [ "${GROUP}" != "developer" ]; then + export CHANNEL_A="${GROUP}" else - export CHANNEL_A=$(echo "${PREV_TAG}" | cut -d "-" -f 1) - export VERSION_A=$(echo "${PREV_TAG}" | cut -d "-" -f 2) + export CHANNEL_A="${CHANNEL_BASE}" fi + if [ "${CHANNEL_A}" = "lts" ]; then echo "Comparing to LTS is not supported yet (needs creds)" exit 0 fi + +export VERSION_A=$(curl -s -S -f -L "https://${CHANNEL_A}.release.flatcar-linux.net/${BOARD}/current/version.txt" | grep -m 1 "FLATCAR_VERSION=" | cut -d "=" -f 2) + if [ "${GROUP}" = "developer" ]; then export CHANNEL_B="developer" export MODE_B="/developer/"