diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 283ed34ae46cbfb6ee7026d98fd07d8ea3121ea0..04c01d0cee6eb8159b59918b9d941c226d5bddaf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,37 +40,30 @@ fmt: - rustup component add rustfmt - pre-commit run fmt -av -build_img: +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/s3bot:latest . - - img push docker.le-memese.com/bots/s3bot:latest + - img login --password "$CI_JOB_TOKEN" --username "$CI_REGISTRY_USER" "$CI_REGISTRY" + - img build --no-console -t "$CI_REGISTRY/telegram-bots/s3bot:latest" . + - img push "$CI_REGISTRY/telegram-bots/s3bot: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"] - environment: - name: prod - action: start - url: "https://s3bot.le-memese.com" + - master script: - helm upgrade @@ -83,3 +76,5 @@ deploy: --timeout 2m --namespace "$NAMESPACE" -f "$HELM_CONFIG" + --set image.repository="$CI_REGISTRY/telegram-bots/s3bot" + --set image.tag="latest"