Skip to content

Commit

Permalink
update e2e gha
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
  • Loading branch information
Per Goncalves da Silva committed Jun 20, 2024
1 parent 5428d69 commit 346c502
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ jobs:
# Build the OLM image and save it as an artifact
build:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.vars.outputs.sha }}
steps:
# checkout code and setup go
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
# build binaries and image for e2e test (includes experimental features)
- name: Build controller image
run: make e2e-build
- name: Save image
run: docker save quay.io/operator-framework/olm:local -o olm-image.tar
- name: Upload Docker image as artifact
- name: Build OLM Image
run: |
make e2e-build
docker save quay.io/operator-framework/olm:local | gzip > olm-image.tar.gz
- name: Build e2e fixture images
run: ./scripts/e2e_test_fixtures.sh --save
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: olm-image.tar
path: olm-image.tar
name: docker-images
path: "*.tar.gz"

# Run e2e tests in parallel jobs
# Take olm image from the previous stage
Expand All @@ -54,13 +54,18 @@ jobs:
with:
go-version-file: "go.mod"

# load the olm image
- name: Load OLM Docker image
# load images into kind
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: olm-image.tar
path: .
- run: docker load < olm-image.tar
name: docker-images
path: images/
- name: Load Docker images
run: |
for image in images/*.tar.gz; do
echo "Loading image $image"
docker load -i $image
done
# set e2e environment variables
# Set ginkgo output and parallelism
Expand All @@ -87,7 +92,7 @@ jobs:
KIND_CLUSTER_NAME="kind-olmv0-${i}" \
KIND_CREATE_OPTS="--kubeconfig=${E2E_KUBECONFIG_ROOT}/kubeconfig-${i}" \
HELM_INSTALL_OPTS="--kubeconfig ${E2E_KUBECONFIG_ROOT}/kubeconfig-${i}" \
make kind-create deploy;
make kind-create load-test-images deploy;
done
# run non-flakes if matrix-id is not 'flakes'
Expand Down

0 comments on commit 346c502

Please sign in to comment.