From 92dcf3fc002330a5419accca973c1b2ba6bb229d Mon Sep 17 00:00:00 2001 From: Jonas Dedden Date: Fri, 23 Feb 2024 23:55:16 +0100 Subject: [PATCH] Add gitlab ci file for docker builds --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..a69ba2f4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +include: + - project: 'deepl/ops/ci-cd-infrastructure/gitlab-ci-lib' + file: + - '/templates/.buildkit.yml' + +stages: + - build + +build: + stage: build + extends: .buildkit + rules: + - if: $CI_COMMIT_TAG =~ /^\d{4}\.\d{1,2}\.\d+-fork-v\d+$/ + - when: manual + allow_failure: true + tags: + - k8s + variables: + TAG: $CI_COMMIT_TAG + HARBOR_REGISTRY_PROJECT: research + DOCKER_IMAGE: ${HARBOR_REGISTRY}/research/${CI_PROJECT_NAME} + BUILDKIT_IMAGE: ${DOCKER_IMAGE}:${TAG} + BUILDKIT_DOCKERFILE_DIR: dask_kubernetes/operator/deployment + BUILDKIT_DOCKERFILE_NAME: Dockerfile