Skip to content

Commit

Permalink
build: build and publish test harness images in release workflow (#341)…
Browse files Browse the repository at this point in the history
… (#350)

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
  • Loading branch information
jan--f committed Sep 6, 2023
1 parent 5bd4be2 commit b6b11bb
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 60 deletions.
5 changes: 1 addition & 4 deletions .github/e2e-tests-olm/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: e2e-tests-olm
description: Runs E2E tests against the OLM bundle
inputs:
go-version:
description: "go version"
required: true
kind-version:
description: "kind version"
required: false
Expand All @@ -18,7 +15,7 @@ runs:
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
1 change: 0 additions & 1 deletion .github/env

This file was deleted.

5 changes: 1 addition & 4 deletions .github/olm-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
5 changes: 1 addition & 4 deletions .github/osd-test-harness-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
5 changes: 1 addition & 4 deletions .github/package-operator-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
quay_token:
description: "Quay token"
required: true
go-version:
description: "go version"
required: true
runs:
using: composite
steps:
Expand All @@ -20,7 +17,7 @@ runs:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -54,12 +51,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -73,12 +67,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -92,13 +83,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -113,10 +101,5 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: e2e tests through OLM
uses: ./.github/e2e-tests-olm
with:
go-version: ${{ env.go-version }}
25 changes: 3 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

- name: e2e tests through OLM
uses: ./.github/e2e-tests-olm
with:
go-version: ${{ env.go-version }}

publish-olm-development:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
Expand All @@ -29,17 +24,14 @@ jobs:
with:
fetch-depth: 0

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

# Bumping the version in the next step will also run code generation scripts
# that depend on controller-gen.
# Therefore, we first need to setup Go so that we can install the
# controller-gen binary.
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -60,7 +52,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
Expand All @@ -76,7 +67,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Publish test harness
uses: ./.github/osd-test-harness-publish
Expand All @@ -100,17 +90,14 @@ jobs:
fetch-depth: 0
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}

- name: Import common environment variables
run: cat ".github/env" >> $GITHUB_ENV

# Bumping the version in the next step will also run code generation scripts
# that depend on controller-gen.
# Therefore, we first need to setup Go so that we can install the
# controller-gen binary.
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand Down Expand Up @@ -151,13 +138,10 @@ jobs:
fetch-depth: 0
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}

- name: Import common environment variables
run: cat ".github/env" >> "$GITHUB_ENV"

- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
go-version-file: 'go.mod'
check-latest: true
cache: true

Expand All @@ -178,7 +162,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
Expand All @@ -194,7 +177,6 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Publish test harness
uses: ./.github/osd-test-harness-publish
Expand All @@ -204,4 +186,3 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

0 comments on commit b6b11bb

Please sign in to comment.