From ddb808f5c535a5186a929ed282245c0ffedb125d Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Thu, 7 Sep 2023 13:36:24 +0200 Subject: [PATCH] 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. --- .github/workflows/ci.yaml | 1 + .github/workflows/run-kola-tests.yaml | 14 ++++++++++++++ ci-automation/vendor-testing/qemu_update.sh | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1cf5c7975f..6a46c5d18d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/run-kola-tests.yaml b/.github/workflows/run-kola-tests.yaml index 4d4df968ea..8c5c0616bb 100644 --- a/.github/workflows/run-kola-tests.yaml +++ b/.github/workflows/run-kola-tests.yaml @@ -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. diff --git a/ci-automation/vendor-testing/qemu_update.sh b/ci-automation/vendor-testing/qemu_update.sh index 7607d7db4c..d4cf2d8105 100755 --- a/ci-automation/vendor-testing/qemu_update.sh +++ b/ci-automation/vendor-testing/qemu_update.sh @@ -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