From 369cb084d0877a83ef771dd70c0e24a7898f14b4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 24 Jan 2024 12:13:48 +0100 Subject: [PATCH] Expirement nobuild procedure WIP --- .github/workflows/itest.yml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index 3856fe28..337cf20d 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -16,7 +16,7 @@ on: required: true env: CIUXCONFIG: /tmp/ciux.sh - CIUX_VERSION: v0.0.1-rc12 + CIUX_VERSION: dev GHA_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} MINIMAL: ${{ inputs.minimal }} NOSCIENCE: ${{ inputs.noscience }} @@ -40,19 +40,37 @@ jobs: go-version: '1.21.4' - name: Install ciux run: go install github.com/k8s-school/ciux@"${{ env.CIUX_VERSION }}" - - name: Ciux project ignition - run: ciux ignite --selector build $PWD - - name: Build fink-broker image for k8s + - name: Build image if not present in registry run: | - ./build.sh + SUFFIX_OPT="" + if [ NOSCIENCE = true ]; then + SUFFIX_OPT="--suffix noscience" + fi + if $IMAGE=$(ciux get image --check $PWD $SUFFIX_OPT) + then + echo "::notice Image already exists" + exit 0 + else + echo "::notice Image does not exist" + ciux ignite --selector build $PWD + ./build.sh + fi - name: Push image to local registry id: push run: | - . "$CIUXCONFIG" - . ./conf.sh - docker push $IMAGE - echo "IMAGE=$IMAGE" >> "$GITHUB_OUTPUT" - echo "PROMOTED_IMAGE=$PROMOTED_IMAGE" >> "$GITHUB_OUTPUT" + # FIXME make it simpler + if $IMAGE=$(ciux get image --check $PWD $SUFFIX_OPT) + then + echo "IMAGE=$IMAGE" >> "$GITHUB_OUTPUT" + . ./conf.sh + echo "PROMOTED_IMAGE=$PROMOTED_IMAGE" >> "$GITHUB_OUTPUT" + else + . "$CIUXCONFIG" + . ./conf.sh + docker push $IMAGE + echo "IMAGE=$IMAGE" >> "$GITHUB_OUTPUT" + + fi integration-tests: name: Run integration tests runs-on: [self-hosted, v3]