Updated CI job

This commit is contained in:
2023-11-24 10:31:59 +00:00
parent 92d1763e0f
commit b68f32d11f

View File

@ -40,37 +40,30 @@ fmt:
- rustup component add rustfmt - rustup component add rustfmt
- pre-commit run fmt -av - pre-commit run fmt -av
build_img: build:
stage: build stage: build
tags:
- kube
only:
refs:
- master
image: image:
name: alpine:3.18 name: alpine:3.18
entrypoint: [""] entrypoint: [""]
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
deploy:
stage: deploy
tags: tags:
- kube - kube
only: only:
refs: - master
- master script:
- apk add --no-cache img
- 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: image:
name: alpine/helm:3.7.1 name: alpine/helm:3.13.2
entrypoint: ["/bin/sh", "-c"] entrypoint: ["/bin/sh", "-c"]
environment: tags:
name: prod - kube
action: start only:
url: "https://s3bot.le-memese.com" - master
script: script:
- helm - helm
upgrade upgrade
@ -83,3 +76,5 @@ deploy:
--timeout 2m --timeout 2m
--namespace "$NAMESPACE" --namespace "$NAMESPACE"
-f "$HELM_CONFIG" -f "$HELM_CONFIG"
--set image.repository="$CI_REGISTRY/telegram-bots/s3bot"
--set image.tag="latest"