diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..8cbb615bac56ebdc9e0ff9b5ee4b89efaa9581a7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +variables: + DOCKER_HOST: "tcp://docker-dind.gitlab-suma:2375" + BUILD_DOCKER_IMAGE: docker:24.0.7 + DEPLOY_KUBERNETES_IMAGE: alpine/k8s:1.22.6 + KUBE_NAMESPACE: maps + +workflow: + rules: + - if: $CI_COMMIT_BRANCH == "master" + variables: + APP_URL: https://maps.metager.de + ENVIRONMENT: production + IMAGE_NAME: $CI_REGISTRY_IMAGE + IMAGE_TAG: master-$CI_COMMIT_SHA + HELM_RELEASE_NAME: $DOCKER_IMAGE_TAG_PREFIX + +stages: + - build + +build_images: + stage: build + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + script: + - docker compose build + - docker compose push + after_script: + - docker logout $$CI_REGISTRY +