-
Notifications
You must be signed in to change notification settings - Fork 54
/
.gitlab-ci.yml
31 lines (28 loc) · 1.13 KB
/
.gitlab-ci.yml
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
variables:
DOCKER_IMAGE: registry.ddbuild.io/docker:24.0.4-gbi-focal
build-staging:
id_tokens:
DDSIGN_ID_TOKEN:
aud: image-integrity
image: $DOCKER_IMAGE
rules:
- if: '$CI_COMMIT_REF_NAME != "master"'
tags:
- "arch:amd64"
script:
- METADATA_FILE=$(mktemp)
- docker buildx build -t registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --label target=staging --target dd-image -f Dockerfile --push --metadata-file ${METADATA_FILE} .
- ddsign sign registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --docker-metadata-file ${METADATA_FILE}
build-prod:
id_tokens:
DDSIGN_ID_TOKEN:
aud: image-integrity
image: $DOCKER_IMAGE
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
tags:
- "arch:amd64"
script:
- METADATA_FILE=$(mktemp)
- docker buildx build -t registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --label target=prod --target dd-image -f Dockerfile --push --metadata-file ${METADATA_FILE} .
- ddsign sign registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --docker-metadata-file ${METADATA_FILE}