forked from GoogleContainerTools/distroless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild_cosign.sh
executable file
·42 lines (31 loc) · 1.65 KB
/
cloudbuild_cosign.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/busybox/sh
set -o errexit
set -o xtrace
cosign version
# Sign all images from 'images' file
cosign sign "$@" $(cat images)
# Sign 'latest' images with cosign
for distro_suffix in "" -debian10 -debian11; do
cosign sign "$@" gcr.io/$PROJECT_ID/static${distro_suffix}:nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/static${distro_suffix}:latest
cosign sign "$@" gcr.io/$PROJECT_ID/static${distro_suffix}:debug-nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/static${distro_suffix}:debug
cosign sign "$@" gcr.io/$PROJECT_ID/base${distro_suffix}:nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/base${distro_suffix}:latest
cosign sign "$@" gcr.io/$PROJECT_ID/base${distro_suffix}:debug-nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/base${distro_suffix}:debug
cosign sign "$@" gcr.io/$PROJECT_ID/cc${distro_suffix}:nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/cc${distro_suffix}:latest
cosign sign "$@" gcr.io/$PROJECT_ID/cc${distro_suffix}:debug-nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/cc${distro_suffix}:debug
cosign sign "$@" gcr.io/$PROJECT_ID/python3${distro_suffix}:nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/python3${distro_suffix}:latest
cosign sign "$@" gcr.io/$PROJECT_ID/python3${distro_suffix}:debug-nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/python3${distro_suffix}:debug
cosign sign "$@" gcr.io/$PROJECT_ID/java${distro_suffix}:nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/java${distro_suffix}:latest
cosign sign "$@" gcr.io/$PROJECT_ID/java${distro_suffix}:debug-nonroot
cosign sign "$@" gcr.io/$PROJECT_ID/java${distro_suffix}:debug
done
cosign sign "$@" gcr.io/$PROJECT_ID/nodejs:latest
cosign sign "$@" gcr.io/$PROJECT_ID/nodejs:debug