This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch release-1.8.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 413a35f3481042031475b72b45d3b242efb6a9a1 Author: Antonin Stefanutti <[email protected]> AuthorDate: Fri Jan 21 12:41:19 2022 +0100 fix(e2e): Use X.Y channels for OLM upgrade e2e tests --- .github/workflows/upgrade.yml | 8 +++++++- e2e/upgrade/olm_upgrade_test.go | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index 9e9e733..764c2ea 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -129,7 +129,11 @@ jobs: export CUSTOM_IMAGE=${{ env.LOCAL_IMAGE_NAME }} export LOCAL_IMAGE_BUNDLE=${KIND_REGISTRY}/apache/camel-k-bundle:${{ env.LOCAL_IMAGE_VERSION }} echo "LOCAL_IMAGE_BUNDLE=${LOCAL_IMAGE_BUNDLE}" >> $GITHUB_ENV - make bundle-build BUNDLE_IMAGE_NAME=${LOCAL_IMAGE_BUNDLE} DEFAULT_CHANNEL="stable" CHANNELS="stable" + export PREV_XY_CHANNEL=stable-$(make get-last-released-version | grep -Po "\d.\d") + echo "PREV_XY_CHANNEL=${PREV_XY_CHANNEL}" >> $GITHUB_ENV + export NEW_XY_CHANNEL=stable-$(make get-version | grep -Po "\d.\d") + echo "NEW_XY_CHANNEL=${NEW_XY_CHANNEL}" >> $GITHUB_ENV + make bundle-build BUNDLE_IMAGE_NAME=${LOCAL_IMAGE_BUNDLE} DEFAULT_CHANNEL="${NEW_XY_CHANNEL}" CHANNELS="stable,${NEW_XY_CHANNEL}" docker push ${LOCAL_IMAGE_BUNDLE} - name: Create new index image run: | @@ -155,6 +159,8 @@ jobs: export CAMEL_K_NEW_IIB=${{ env.LOCAL_IIB }} export KAMEL_K_TEST_RELEASE_VERSION=$(make get-last-released-version) export KAMEL_K_TEST_OPERATOR_CURRENT_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION} + export CAMEL_K_PREV_UPGRADE_CHANNEL=${{ env.PREV_XY_CHANNEL }} + export CAMEL_K_NEW_UPGRADE_CHANNEL=${{ env.NEW_XY_CHANNEL }} # Then run integration tests make test-upgrade diff --git a/e2e/upgrade/olm_upgrade_test.go b/e2e/upgrade/olm_upgrade_test.go index 9c7856f..5431400 100644 --- a/e2e/upgrade/olm_upgrade_test.go +++ b/e2e/upgrade/olm_upgrade_test.go @@ -73,8 +73,8 @@ func TestOLMAutomaticUpgrade(t *testing.T) { args := []string{"install", "-n", ns, "--olm=true", "--olm-source", catalogSourceName, "--olm-source-namespace", ns} - if crossChannelUpgrade { - args = append(args, "--olm-channel", os.Getenv("CAMEL_K_PREV_UPGRADE_CHANNEL")) + if prevUpdateChannel != "" { + args = append(args, "--olm-channel", prevUpdateChannel) } Expect(Kamel(args...).Execute()).To(Succeed())
