From b5d2ca6e9e506eb2d80e49427a88d4cb46e9883d Mon Sep 17 00:00:00 2001 From: Damian Badura <45110612+dbadura@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:37:33 +0100 Subject: [PATCH] Move gardener to GitHub actions (#753) Co-authored-by: Marcin Dobrochowski --- .github/workflows/operator-verify.yaml | 17 ++++++++++++----- hack/Makefile | 7 ------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/operator-verify.yaml b/.github/workflows/operator-verify.yaml index efb2992e8..e0702fbd6 100644 --- a/.github/workflows/operator-verify.yaml +++ b/.github/workflows/operator-verify.yaml @@ -67,12 +67,19 @@ jobs: run: 'echo "$GARDENER_SA" > /tmp/gardener-sa.yaml' env: GARDENER_SA: ${{ secrets.GARDENER_SA }} - - name: run test - run: make -C hack gardener-integration-test + - name: provision gardener + run: make -C hack provision-gardener env: - IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }} GARDENER_SECRET_NAME: ${{ secrets.GARDENER_SECRET_NAME }} GARDENER_PROJECT: ${{ secrets.GARDENER_PROJECT }} GARDENER_SA_PATH: /tmp/gardener-sa.yaml - IMG_DIRECTORY: "prod" - IMG_VERSION: ${{ github.sha }} + - name: run test + run: make -C hack integration-test-on-cluster + env: + IMG: europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.sha }} + - name: deprovision gardener +# https://docs.github.com/en/actions/learn-github-actions/expressions#always + if: ${{ always() }} + run: make -C hack deprovision-gardener + env: + GARDENER_SA_PATH: /tmp/gardener-sa.yaml diff --git a/hack/Makefile b/hack/Makefile index f6f2f8426..a373540e3 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -11,13 +11,6 @@ include ${PROJECT_ROOT}/hack/gardener.mk integration-test: ## Run integration tests on self-prepared k3d cluster. make -C ${TEST_ROOT} serverless-integration serverless-contract-tests -.PHONY: gardener-integration-test -gardener-integration-test: ## Provision gardener cluster and run integration test on it. - make provision-gardener && make -C ${PROJECT_ROOT} install-serverless-custom-operator && \ - make integration-test \ - deprovision-gardener || \ - (make deprovision-gardener && false) - .PHONY: integration-test-on-cluster integration-test-on-cluster: ## Install serverless with default serverless-cr, run integration tests and remove serverless-cr make -C ${PROJECT_ROOT} install-serverless-custom-operator