From ea614df0ba669c2d9d9486bdaab1d1022bf0909d Mon Sep 17 00:00:00 2001 From: Fabrice Jammes Date: Fri, 19 Jul 2024 12:55:38 +0200 Subject: [PATCH] Fix ciux init in CI --- .github/workflows/e2e-common.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-common.yml b/.github/workflows/e2e-common.yml index 81020aae..669fc18c 100644 --- a/.github/workflows/e2e-common.yml +++ b/.github/workflows/e2e-common.yml @@ -24,7 +24,6 @@ on: private_registry_token: required: true env: - CIUXCONFIG: /tmp/ciux.sh CIUX_VERSION: v0.0.4-rc2 GHA_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} SUFFIX: ${{ inputs.suffix }} @@ -49,6 +48,7 @@ jobs: run: go install github.com/k8s-school/ciux@"${{ env.CIUX_VERSION }}" - name: Build fink-broker image for k8s run: | + mkdir -p $HOME/.ciux ./build.sh -s "${{ env.SUFFIX }}" -r "${{ env.CI_REPO }}" - name: Export fink-broker image id: export @@ -89,10 +89,10 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - detached: true + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + # with: + # detached: true - name: Maximize build space run: | echo "Removing unwanted software... " @@ -114,6 +114,7 @@ jobs: run: go install github.com/k8s-school/ciux@"${{ env.CIUX_VERSION }}" - name: Ciux project ignition run: | + mkdir -p $HOME/.ciux ciux ignite --selector ci --branch="$GHA_BRANCH_NAME" $PWD --suffix "${{ env.SUFFIX }}" --tmp-registry "${{ env.CI_REPO }}" - name: Create k8s (kind) cluster run: | @@ -141,7 +142,7 @@ jobs: path: artifacts - name: Load container image inside kind run: | - . "$CIUXCONFIG" + . "$HOME/.ciux/ciux.sh" if [ -f artifacts/image.tar ]; then echo "Loading image from archive" kind load image-archive artifacts/image.tar @@ -151,7 +152,7 @@ jobs: fi - name: Run fink-alert-simulator run: | - . "$CIUXCONFIG" + export CIUXCONFIG="$HOME/.ciux/ciux.sh" kubectl config set-context --current --namespace=argo "$FINK_ALERT_SIMULATOR_DIR"/argo-submit.sh argo watch @latest @@ -166,7 +167,7 @@ jobs: - name: Promote fink-broker image id: promote run: | - . "$CIUXCONFIG" + . "$HOME/.ciux/ciux.sh" echo "PROMOTED_IMAGE=$CIUX_IMAGE_REGISTRY/$CIUX_IMAGE_NAME:$CIUX_IMAGE_TAG" >> "$GITHUB_OUTPUT" echo "NEW_IMAGE=$CIUX_BUILD" >> "$GITHUB_OUTPUT" image-analysis: