Skip to content

Commit b9112b8

Browse files
author
Per Goncalves da Silva
committed
gha fixes
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 9d9dc14 commit b9112b8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
outputs:
1717
sha: ${{ steps.vars.outputs.sha }}
18+
UPDATE_FIXTURES: ${{ steps.fixtures.outputs.UPDATE_FIXTURES }}
1819
steps:
1920
# checkout code and setup go
2021
- uses: actions/checkout@v4
@@ -23,12 +24,16 @@ jobs:
2324
go-version-file: "go.mod"
2425
# add the fixtures changed flag (UPDATE_FIXTURES) to the job output to others can use it
2526
- name: Rebuild fixtures if necessary
27+
id: fixtures
2628
run: |
2729
UPDATE_FIXTURES="$(scripts/e2e_test_fixtures.sh --check)"
2830
if [ "${UPDATE_FIXTURES}" == "true" ]; then
2931
# rebuild fixtures and export the images to .tar.gz files with --save
3032
scripts/e2e_test_fixtures.sh --save
3133
fi
34+
35+
# Add UPDATE_FIXTURES to the job output
36+
echo "UPDATE_FIXTURES=${UPDATE_FIXTURES}" >> $GITHUB_OUTPUT
3237
3338
# build binaries and image for e2e test (includes experimental features)
3439
- name: Build OLM Image
@@ -100,10 +105,8 @@ jobs:
100105
KIND_CLUSTER_NAME="kind-olmv0-${i}" \
101106
KIND_CREATE_OPTS="--kubeconfig=${E2E_KUBECONFIG_ROOT}/kubeconfig-${i}" \
102107
HELM_INSTALL_OPTS="--kubeconfig ${E2E_KUBECONFIG_ROOT}/kubeconfig-${i}" \
108+
UPDATE_FIXTURES="${{ needs.build.outputs.UPDATE_FIXTURES }}" \
103109
make kind-create deploy;
104-
if [ "${{ needs.build.outputs.UPDATE_FIXTURES }}" == "true" ]; then
105-
scripts/e2e_test_fixtures.sh --kind-load
106-
fi
107110
done
108111
109112
# run non-flakes if matrix-id is not 'flakes'

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ kind-create: kind-clean #HELP Create a new kind cluster $KIND_CLUSTER_NAME (defa
213213
.PHONY: deploy
214214
OLM_IMAGE := quay.io/operator-framework/olm:local
215215
deploy: $(KIND) $(HELM) #HELP Deploy OLM to kind cluster $KIND_CLUSTER_NAME (default: kind-olmv0) using $OLM_IMAGE (default: quay.io/operator-framework/olm:local)
216-
$(KIND) load docker-image $(OLM_IMAGE) --name $(KIND_CLUSTER_NAME); \
216+
$(KIND) load docker-image $(OLM_IMAGE) --name $(KIND_CLUSTER_NAME)
217+
@if [ "${UPDATE_FIXTURES}" = "true" ]; then \
218+
scripts/e2e_test_fixtures.sh --kind-load --skip-build; \
219+
fi
217220
$(HELM) upgrade --install olm deploy/chart \
218221
--set debug=true \
219222
--set olm.image.ref=$(OLM_IMAGE) \

scripts/e2e_test_fixtures.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ while [ $# -gt 0 ]; do
5454
*)
5555
printf "*************************\n"
5656
printf "* Error: Invalid argument.\n"
57-
# shellcheck disable=SC2059
5857
printf "* Usage: %s [--opm-version=version] [--check] [--push] [--container-runtime=runtime] [--registry=registry] [--target-branch=branch] [--kind-load] [--save] [--skip-build] \n" "$0"
5958
printf "\n"
6059
printf "\t--opm-version: opm version to build the fixtures against, e.g. 1.39.0\n"

0 commit comments

Comments
 (0)