From 6c464dcaf135240c43231f43a3a7142db5cea15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Fri, 20 Oct 2023 09:11:25 +0200 Subject: [PATCH] Use apply command in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- .github/actions/constellation_create/action.yml | 6 +++++- .github/workflows/e2e-windows.yml | 2 +- e2e/internal/upgrade/upgrade_test.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/constellation_create/action.yml b/.github/actions/constellation_create/action.yml index 7864523bbe0..1cff535f575 100644 --- a/.github/actions/constellation_create/action.yml +++ b/.github/actions/constellation_create/action.yml @@ -141,7 +141,11 @@ runs: id: constellation-init shell: bash run: | - constellation init --force --debug + cmd=apply + if constellation --help | grep -q init; then + cmd=init + fi + constellation $cmd --force --debug echo "KUBECONFIG=$(pwd)/constellation-admin.conf" | tee -a $GITHUB_OUTPUT - name: Wait for nodes to join and become ready diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.yml index db5c80f55a4..b3673f87549 100644 --- a/.github/workflows/e2e-windows.yml +++ b/.github/workflows/e2e-windows.yml @@ -78,7 +78,7 @@ jobs: - name: Initialize cluster shell: pwsh run: | - .\constellation.exe init --debug + .\constellation.exe apply --debug - name: Liveness probe shell: pwsh diff --git a/e2e/internal/upgrade/upgrade_test.go b/e2e/internal/upgrade/upgrade_test.go index b72d252f83f..d6cb9f4d8ca 100644 --- a/e2e/internal/upgrade/upgrade_test.go +++ b/e2e/internal/upgrade/upgrade_test.go @@ -343,7 +343,7 @@ func runUpgradeApply(require *require.Assertions, cli string) { tfLogFlag = "--tf-log=DEBUG" } - cmd = exec.CommandContext(context.Background(), cli, "upgrade", "apply", "--debug", "--yes", tfLogFlag) + cmd = exec.CommandContext(context.Background(), cli, "apply", "--debug", "--yes", tfLogFlag) stdout, stderr, err = runCommandWithSeparateOutputs(cmd) require.NoError(err, "Stdout: %s\nStderr: %s", string(stdout), string(stderr)) require.NoError(containsUnexepectedMsg(string(stdout)))