Skip to content

Commit

Permalink
Move gardener to GitHub actions (#753)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Dobrochowski <[email protected]>
  • Loading branch information
dbadura and anoipm authored Mar 1, 2024
1 parent e425482 commit b5d2ca6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/operator-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 0 additions & 7 deletions hack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5d2ca6

Please sign in to comment.