GitHub Actions: Use correct version in kola run and skip update test

The kola run didn't pick up the version that was set up in the build
because the git changes from that step are lost.
Redo the version setup in the kola run to use the same version, and
skip the kola update test if no update payload can be found. In the
future we should copy it over from the GitHub Action artifact.
This commit is contained in:
Kai Lueke 2023-09-07 13:36:24 +02:00
parent 995ae2cdbc
commit ddb808f5c5
3 changed files with 21 additions and 0 deletions

View File

@ -120,6 +120,7 @@ jobs:
set -x
set -euo pipefail
# This is also done again in run-kola-tests.yaml because these changes here disappear
source ci-automation/ci_automation_common.sh
source sdk_container/.repo/manifests/version.txt

View File

@ -205,6 +205,20 @@ jobs:
python3 -m http.server -d "${TESTS_WEBSERVER_WEBROOT}" -b "${TESTS_WEBSERVER_IP}" "${TESTS_WEBSERVER_PORT}" &
pushd scripts
source ci-automation/ci_automation_common.sh
source sdk_container/.repo/manifests/version.txt
version="alpha-$FLATCAR_VERSION_ID"
check_version_string "$version"
sdk_version="${CUSTOM_SDK_VERSION:-$FLATCAR_SDK_VERSION}"
# Create version file
(
source sdk_lib/sdk_container_common.sh
create_versionfile "$sdk_version" "$version"
)
source ci-automation/test.sh
# Provide our own torcx prepare function so we use our local manifest json.

View File

@ -27,6 +27,12 @@ mkdir -p "$(dirname ${QEMU_UPDATE_PAYLOAD})"
if [ -f "${QEMU_UPDATE_PAYLOAD}" ] ; then
echo "++++ ${CIA_TESTSCRIPT}: Using existing ${QEMU_UPDATE_PAYLOAD} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"
else
# TODO: Change the GitHub Action to provide this artifact and detect that case here and skip the bincache download
if ! curl --head -o /dev/null -fsSL --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 "https://bincache.flatcar-linux.net/images/${CIA_ARCH}/${CIA_VERNUM}/flatcar_test_update.gz"; then
echo "1..1" > "${CIA_TAPFILE}"
echo "ok - skipped qemu update tests" >> "${CIA_TAPFILE}"
exit 0
fi
echo "++++ ${CIA_TESTSCRIPT}: downloading flatcar_test_update.gz for ${CIA_VERNUM} (${CIA_ARCH}) ++++"
copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/flatcar_test_update.gz" tmp/
fi