Skip to content

Commit

Permalink
Merge pull request #437 from DataDog/mborst/k8s-based-CI-runners
Browse files Browse the repository at this point in the history
[CI] Migrate to k8s-based CI runners
  • Loading branch information
mborst authored Feb 16, 2024
2 parents 6447050 + 4950413 commit 82bc7ab
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ build-staging:
image: $DOCKER_IMAGE
rules:
- if: '$CI_COMMIT_REF_NAME != "master"'
tags: ["runner:docker"]
tags:
- "arch:amd64"
script:
- docker build -t registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --label target=staging --target dd-image -f Dockerfile .
- docker push registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}
- ddsign sign registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --digest-from-docker
- 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:
Expand All @@ -22,8 +23,9 @@ build-prod:
image: $DOCKER_IMAGE
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
tags: ["runner:docker"]
tags:
- "arch:amd64"
script:
- docker build -t registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --label target=prod --target dd-image -f Dockerfile .
- docker push registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}
- ddsign sign registry.ddbuild.io/kafka-kit:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA} --digest-from-docker
- 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}

0 comments on commit 82bc7ab

Please sign in to comment.