Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): Execute helm upgrade test only on main branch #4959

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion e2e/install/upgrade/helm_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ limitations under the License.
package upgrade

import (
"errors"
"fmt"
"os"
"os/exec"
Expand All @@ -41,6 +42,13 @@ 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", "../../../")
Expand All @@ -57,7 +65,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",
Expand Down