Skip to content

Commit 2f69b20

Browse files
committed
docker provenance
1 parent 99613dc commit 2f69b20

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.ci/versioned.release.cloudbuild.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,26 @@ steps:
1717
waitFor: ['-']
1818
script: |
1919
#!/usr/bin/env bash
20+
set -e
2021
export VERSION=$(cat ./cmd/version.txt)
2122
docker buildx create --name container-builder --driver docker-container --bootstrap --use
2223
2324
export TAGS="-t ${_DOCKER_URI}:$VERSION"
24-
if [[ $_PUSH_LATEST == 'true' ]]; then
25+
if [[ "$_PUSH_LATEST" == "true" ]]; then
2526
export TAGS="$TAGS -t ${_DOCKER_URI}:latest"
2627
fi
27-
docker buildx build --platform linux/amd64,linux/arm64 --build-arg BUILD_TYPE=container.release --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) $TAGS --push .
28+
29+
# Build and push
30+
docker buildx build \
31+
--platform linux/amd64,linux/arm64 \
32+
--build-arg BUILD_TYPE=container.release \
33+
--build-arg COMMIT_SHA=$(git rev-parse --short HEAD) \
34+
$TAGS \
35+
--push .
36+
37+
# Pull the image to ensure it's available for provenance generation.
38+
docker pull ${_DOCKER_URI}:${VERSION}
39+
docker tag ${_DOCKER_URI}:${VERSION} ${_DOCKER_URI}:latest
2840
2941
- id: "install-dependencies"
3042
name: golang:1
@@ -339,7 +351,11 @@ steps:
339351
export VERSION=v$(cat ./cmd/version.txt)
340352
gcloud storage cp toolbox.geminicli.windows.amd64 gs://$_BUCKET_NAME/geminicli/$VERSION/windows/amd64/toolbox.exe
341353
354+
images:
355+
- "${_DOCKER_URI}:latest"
356+
342357
options:
358+
requestedVerifyOption: VERIFIED # This ensures provenance is generated
343359
automapSubstitutions: true
344360
dynamicSubstitutions: true
345361
logging: CLOUD_LOGGING_ONLY # Necessary for custom service account

0 commit comments

Comments
 (0)