From f5b528fd998684125d7456c050d20aaae49604d2 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Fri, 24 Nov 2023 10:37:45 +0000 Subject: [PATCH] Updated CI --- .gitlab-ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e58f814..374b554 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,33 +2,31 @@ stages: - build - deploy -image-builder: + +build: stage: build - tags: - - kube - only: - refs: - - master image: name: alpine:3.18 entrypoint: [""] - + tags: + - kube + only: + - master script: - apk add --no-cache img - - img login --password "${DOCKER_PASSWORD}" --username "${DOCKER_USER}" "${DOCKER_REGISTRY}" - - img build --no-console -t "docker.le-memese.com/bots/lenochka-bot:latest" . - - img push "docker.le-memese.com/bots/lenochka-bot:latest" + - img login --password "$CI_JOB_TOKEN" --username "$CI_REGISTRY_USER" "$CI_REGISTRY" + - img build --no-console -t "$CI_REGISTRY/telegram-bots/lenochka:latest" . + - img push "$CI_REGISTRY/telegram-bots/lenochka:latest" deploy: stage: deploy + image: + name: alpine/helm:3.13.2 + entrypoint: ["/bin/sh", "-c"] tags: - kube only: - refs: - - master - image: - name: alpine/helm:3.7.1 - entrypoint: ["/bin/sh", "-c"] + - master script: - helm upgrade @@ -42,3 +40,5 @@ deploy: --namespace "$NAMESPACE" -f "$HELM_CONFIG" --set "podAnnotations.deployed_at=$(date +%Y.%m.%d-%H:%M)" + --set image.repository="$CI_REGISTRY/telegram-bots/lenochka" + --set image.tag="latest" -- GitLab