Setup sigstore id token

This commit is contained in:
2023-07-23 21:16:41 -04:00
parent 65b3959065
commit 693fa5901c

View File

@@ -3,6 +3,7 @@ stages:
variables: variables:
COSIGN_PASSWORD: "" COSIGN_PASSWORD: ""
COSIGN_YES: "true"
default: default:
image: registry.gitlab.com/wunker-bunker/ci-builder image: registry.gitlab.com/wunker-bunker/ci-builder
@@ -45,6 +46,9 @@ default:
build: build:
stage: build stage: build
id_tokens:
SIGSTORE_ID_TOKEN:
aud: sigstore
parallel: parallel:
matrix: matrix:
- RECIPE: - RECIPE:
@@ -58,4 +62,5 @@ build:
buildah push $FULL_IMAGE_NAME:$TAG buildah push $FULL_IMAGE_NAME:$TAG
done done
- DIGEST=($(buildah images --format '{{.Digest}}' $FULL_IMAGE_NAME:$TAGS)) - DIGEST=($(buildah images --format '{{.Digest}}' $FULL_IMAGE_NAME:$TAGS))
- cosign sign -y --key $SIGNING_SECRET $FULL_IMAGE_NAME@$DIGEST - IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' $FULL_IMAGE_NAME:$TAGS)
- cosign sign $IMAGE_DIGEST