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
- pre-commit run fmt -av
build_img:
build:
stage: build
tags:
- kube
only:
refs:
- master
image:
name: alpine:3.18
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:
- kube
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:
name: alpine/helm:3.7.1
name: alpine/helm:3.13.2
entrypoint: ["/bin/sh", "-c"]
environment:
name: prod
action: start
url: "https://s3bot.le-memese.com"
tags:
- kube
only:
- 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"