-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mutli arch build and manifest for the operator repo
Signed-off-by: Mohamed Mahmoud <[email protected]>
- Loading branch information
1 parent
8abeb40
commit 3e04048
Showing
7 changed files
with
157 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,15 @@ jobs: | |
id-token: write # needed for signing the images with GitHub OIDC Token | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
WF_BPFMAN_AGENT_IMG: quay.io/bpfman/bpfman-agent | ||
WF_BPFMAN_OPERATOR_IMG: quay.io/bpfman/bpfman-operator | ||
WF_MULTIARCH_TARGETS: amd64 ppc64le s390x # FIXME arm64 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- registry: quay.io | ||
build_language: go | ||
repository: bpfman | ||
image: bpfman-agent | ||
dockerfile: ./Containerfile.bpfman-agent | ||
|
@@ -36,7 +39,6 @@ jobs: | |
type=raw,value=latest,enable={{is_default_branch}} | ||
- registry: quay.io | ||
build_language: go | ||
repository: bpfman | ||
image: bpfman-operator | ||
dockerfile: ./Containerfile.bpfman-operator | ||
|
@@ -50,7 +52,6 @@ jobs: | |
type=raw,value=latest,enable={{is_default_branch}} | ||
- registry: quay.io | ||
build_language: go | ||
repository: bpfman | ||
image: bpfman-operator-bundle | ||
context: . | ||
|
@@ -68,10 +69,9 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
if: ${{ matrix.image.build_language == 'go' }} | ||
with: | ||
# prettier-ignore | ||
go-version: '1.21' # yamllint disable-line rule:quoted-strings | ||
go-version: '1.22' # yamllint disable-line rule:quoted-strings | ||
|
||
- uses: sigstore/[email protected] | ||
|
||
|
@@ -109,7 +109,7 @@ jobs: | |
- name: Push to registry | ||
id: push-image | ||
uses: redhat-actions/push-to-registry@v2 | ||
if: ${{ github.event_name == 'push' }} | ||
if: ${{ github.event_name == 'push' && matrix.image.image != 'mutli-arch-images' }} | ||
with: | ||
tags: ${{ steps.meta.outputs.tags }} | ||
|
||
|
@@ -120,3 +120,26 @@ jobs: | |
for tag in ${tags[@]}; do | ||
cosign sign -y "${tag}@${{ steps.push-image.outputs.digest }}" | ||
done | ||
- name: get short sha | ||
run: | | ||
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
- name: Build operator multi arch images | ||
if: ${{ matrix.image.image == 'bpfman-operator' }} | ||
run: | | ||
BPFMAN_AGENT_IMG="${{ env.WF_BPFMAN_AGENT_IMG }}:${{ env.short_sha }}" BPFMAN_OPERATOR_IMG="${{ env.WF_BPFMAN_OPERATOR_IMG}}:${{ env.short_sha }}" MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" make build-operator-images | ||
- name: Push operator multi arch images and manifest | ||
if: ${{ github.event_name == 'push' && matrix.image.image == 'bpfman-operator' }} | ||
run: | | ||
BPFMAN_AGENT_IMG="${{ env.WF_BPFMAN_AGENT_IMG }}:${{ env.short_sha }}" BPFMAN_OPERATOR_IMG="${{ env.WF_BPFMAN_OPERATOR_IMG}}:${{ env.short_sha }}" MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" make operator-images | ||
- name: Build agent multi arch images | ||
if: ${{ matrix.image.image == 'bpfman-agent' }} | ||
run: | | ||
BPFMAN_AGENT_IMG="${{ env.WF_BPFMAN_AGENT_IMG }}:${{ env.short_sha }}" BPFMAN_OPERATOR_IMG="${{ env.WF_BPFMAN_OPERATOR_IMG}}:${{ env.short_sha }}" MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" make build-agent-images | ||
- name: Push agent multi arch images and manifest | ||
if: ${{ github.event_name == 'push' && matrix.image.image == 'bpfman-agent' }} | ||
run: | | ||
BPFMAN_AGENT_IMG="${{ env.WF_BPFMAN_AGENT_IMG }}:${{ env.short_sha }}" BPFMAN_OPERATOR_IMG="${{ env.WF_BPFMAN_OPERATOR_IMG}}:${{ env.short_sha }}" MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" make agent-images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters