Files
lenochka/.gitlab-ci.yml
Pavel Kirilin a28019a8c8 Some small updates.
Signed-off-by: Pavel Kirilin <win10@list.ru>
2023-09-22 00:18:02 +04:00

45 lines
865 B
YAML

stages:
- build
- deploy
image-builder:
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/lenochka-bot:latest" .
- img push "docker.le-memese.com/bots/lenochka-bot:latest"
deploy:
stage: deploy
tags:
- kube
only:
refs:
- master
image:
name: alpine/helm:3.7.1
entrypoint: ["/bin/sh", "-c"]
script:
- helm
upgrade
lenochka
./helm
--install
--wait
--create-namespace
--atomic
--timeout 2m
--namespace "$NAMESPACE"
-f "$HELM_CONFIG"
--set "podAnnotations.deployed_at=$(date +%Y.%m.%d-%H:%M)"