From 2630bee06af7d8dca5102b6fdb326220603ff399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20R=C3=A9thelyi?= <rethelyibalint@gmail.com> Date: Thu, 14 Oct 2021 13:17:26 +0200 Subject: [PATCH] try --- .gitlab-ci.yml | 17 +++++++++++++++++ k8s/values.yaml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c2575a..0681d52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,3 +79,20 @@ production: rules: - if: $CI_COMMIT_TAG when: manual + +staging: + stage: deploy + image: + name: docker.io/blintmester/base-helm-kubectl:1.0.1 + entrypoint: [""] + needs: + - dockerhub + before_script: + - echo $KUBECONFIG + - chmod 600 $KUBECONFIG + script: + - bash + - cd "$CI_PROJECT_DIR"/k8s + - envsubst < values.yaml | helm upgrade --install --wait becskasszasch . -n becskasszasch-staging --values - + rules: + - when: manual \ No newline at end of file diff --git a/k8s/values.yaml b/k8s/values.yaml index ff5ee65..f4698ec 100644 --- a/k8s/values.yaml +++ b/k8s/values.yaml @@ -7,5 +7,5 @@ POSTGRES: "${POSTGRES}" POSTGRES_PASS: "${POSTGRES_PASS}" POSTGRES_USER: "${POSTGRES_USER}" POSTGRES_DB: "${POSTGRES_DB}" -Tag: "v1.6.9" +Tag: "${CI_COMMIT_REF_NAME}" REGISTRY_CONF: "${REGISTRY_CONF}" -- GitLab