Disable binary signing in snapshot mode
Snapshot builds failed for external contributors due to cosign. Since snapshot builds are not official releases, we do not need to sign binaries. Disabling signing in this mode fixes the issue. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -74,16 +74,18 @@ sboms:
|
||||
- "--source-version={{ .Version }}"
|
||||
|
||||
signs:
|
||||
- cmd: cosign
|
||||
- cmd: sh
|
||||
env:
|
||||
- COSIGN_EXPERIMENTAL=1
|
||||
certificate: "${artifact}.pem"
|
||||
args:
|
||||
- sign-blob
|
||||
- "--output-certificate=${certificate}"
|
||||
- "--output-signature=${signature}"
|
||||
- "${artifact}"
|
||||
- "--yes"
|
||||
- -c
|
||||
- |
|
||||
if [ "{{ .IsSnapshot }}" = "true" ]; then
|
||||
echo "Skipping signing (snapshot: {{ .IsSnapshot }})"
|
||||
else
|
||||
cosign sign-blob --output-certificate="${certificate}" --output-signature="${signature}" "${artifact}" --yes
|
||||
fi
|
||||
artifacts: checksum
|
||||
output: true
|
||||
|
||||
@@ -101,25 +103,33 @@ docker_manifests:
|
||||
|
||||
docker_signs:
|
||||
- id: images
|
||||
cmd: cosign
|
||||
cmd: sh
|
||||
env:
|
||||
- COSIGN_EXPERIMENTAL=1
|
||||
artifacts: images
|
||||
output: true
|
||||
args:
|
||||
- "sign"
|
||||
- "${artifact}@${digest}"
|
||||
- "--yes"
|
||||
- -c
|
||||
- |
|
||||
if [ "{{ .IsSnapshot }}" = "true" ]; then
|
||||
echo "Skipping Docker image signing (snapshot: {{ .IsSnapshot }})"
|
||||
else
|
||||
cosign sign "${artifact}@${digest}" --yes
|
||||
fi
|
||||
- id: manifests
|
||||
cmd: cosign
|
||||
cmd: sh
|
||||
env:
|
||||
- COSIGN_EXPERIMENTAL=1
|
||||
artifacts: manifests
|
||||
output: true
|
||||
args:
|
||||
- "sign"
|
||||
- "${artifact}@${digest}"
|
||||
- "--yes"
|
||||
- -c
|
||||
- |
|
||||
if [ "{{ .IsSnapshot }}" = "true" ]; then
|
||||
echo "Skipping Docker manifest signing (snapshot: {{ .IsSnapshot }})"
|
||||
else
|
||||
cosign sign "${artifact}@${digest}" --yes
|
||||
fi
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
|
||||
Reference in New Issue
Block a user