Skip to content

Commit 279e591

Browse files
authored
ci(ubi-rust-builder): Disable provenance generation (#1427)
* ci(ubi-rust-builder): Disable provenance generation This fixes the image build failures occurring since the last couple of days. The issue itself is caused by provenance generation, which produces an image index manifest instead of an image manifest as before. This then causes the `docker manifest create` command to fail, because it cannot create index manifests out of other index manifests, only normal image manifests. It seems like that a newer Docker version enabled provenance generation by default. This GHA workflow does NOT pin the exact docker (and builder) version we use, which seems like the reason why this issue started popping up without any changes to the workflow or the Dockerfile for these images. Going forward, we should pin the exact Docker version we want to use. This will be done in a separate PR. For now we chose to disable provenance entirely even though we want to use it in general. However, we decided to deal with this once we start to actively work on provenance across our platform. * chore: Reorder keys and add blank lines
1 parent 90a247d commit 279e591

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/ubi-rust-builder.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,31 @@ jobs:
2121
build:
2222
permissions:
2323
id-token: write
24+
runs-on: ${{ matrix.runner }}
2425
strategy:
2526
fail-fast: false
2627
matrix:
2728
runner: ["ubuntu-latest", "ubicloud-standard-8-arm-ubuntu-2404"]
2829
ubi-version: ["ubi9"]
29-
runs-on: ${{ matrix.runner }}
3030
steps:
3131
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3232
with:
3333
persist-credentials: false
34+
3435
- name: Login to Stackable Harbor
3536
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3637
with:
3738
registry: oci.stackable.tech
3839
username: robot$sdp+github-action-build
3940
password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
41+
4042
- name: Set up Cosign
4143
uses: sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5 # v3.10.1
44+
4245
- name: Determine Architecture
4346
run: |
4447
echo "TAG=$(git rev-parse --short HEAD)-$(arch)" >> "$GITHUB_ENV"
48+
4549
- name: Build and push
4650
id: build-and-push
4751
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
@@ -50,6 +54,8 @@ jobs:
5054
file: ./${{ matrix.ubi-version }}-rust-builder/Dockerfile
5155
push: true
5256
tags: oci.stackable.tech/sdp/${{ matrix.ubi-version }}-rust-builder:${{ env.TAG }}
57+
provenance: false
58+
5359
- name: Sign the published builder image
5460
shell: bash
5561
env:
@@ -59,28 +65,33 @@ jobs:
5965
# This generates a signature and publishes it to the registry, next to the image
6066
# Uses the keyless signing flow with Github Actions as identity provider
6167
cosign sign -y "oci.stackable.tech/sdp/${{ matrix.ubi-version }}-rust-builder@$DIGEST"
68+
6269
create_manifest:
70+
name: Create and Push Image Index Manifest
71+
needs: ["build"]
6372
permissions:
6473
id-token: write
74+
runs-on: ubuntu-latest
6575
strategy:
6676
fail-fast: false
6777
matrix:
6878
ubi-version: ["ubi9"]
69-
runs-on: ubuntu-latest
70-
needs: ["build"]
7179
steps:
7280
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7381
with:
7482
persist-credentials: false
83+
7584
- name: Login to Stackable Harbor
7685
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
7786
with:
7887
registry: oci.stackable.tech
7988
username: robot$sdp+github-action-build
8089
password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
90+
8191
- name: Set up Cosign
8292
uses: sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5 # v3.10.1
83-
- name: Build Manifest List
93+
94+
- name: Create and Push Image Index Manifest
8495
shell: bash
8596
run: |
8697
COMMIT_ID=$(git rev-parse --short HEAD)

0 commit comments

Comments
 (0)