This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch release-2.0.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 262eacc7d21da86cf4fd4b4dd7e5a6af91372363 Author: Gaelle Fournier <gaelle.fournier.w...@gmail.com> AuthorDate: Tue Dec 5 16:57:36 2023 +0100 fix(e2e): Execute helm upgrade test only on main branch --- e2e/install/upgrade/helm_upgrade_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/e2e/install/upgrade/helm_upgrade_test.go b/e2e/install/upgrade/helm_upgrade_test.go index f966acb42..7f7d98f39 100644 --- a/e2e/install/upgrade/helm_upgrade_test.go +++ b/e2e/install/upgrade/helm_upgrade_test.go @@ -21,6 +21,7 @@ limitations under the License. package upgrade import ( + "errors" "fmt" "os" "os/exec" @@ -39,6 +40,14 @@ func TestHelmOperatorUpgrade(t *testing.T) { KAMEL_INSTALL_REGISTRY := os.Getenv("KAMEL_INSTALL_REGISTRY") // need to add last release version releaseVersion := os.Getenv("KAMEL_K_TEST_RELEASE_VERSION") + + // if the last released version chart is not present skip the test + releaseChart := fmt.Sprintf("../../../docs/charts/camel-k-%s.tgz", releaseVersion) + if _, err := os.Stat(releaseChart); errors.Is(err, os.ErrNotExist) { + t.Skip("last release version chart not found: skipping") + return + } + customImage := fmt.Sprintf("%s/apache/camel-k", KAMEL_INSTALL_REGISTRY) os.Setenv("CAMEL_K_TEST_MAKE_DIR", "../../../") @@ -55,7 +64,7 @@ func TestHelmOperatorUpgrade(t *testing.T) { "helm", "install", "camel-k", - fmt.Sprintf("../../../docs/charts/camel-k-%s.tgz", releaseVersion), + releaseChart, "--set", fmt.Sprintf("platform.build.registry.address=%s", KAMEL_INSTALL_REGISTRY), "--set",