godash/.gitlab/deploy.gitlab-ci.yml

20 lines
892 B
YAML
Raw Normal View History

2023-08-30 08:58:57 +02:00
deploy:
2023-06-27 14:56:31 +02:00
rules: !reference [.rules:release, rules]
stage: deploy
image: debian:${DEBIAN_VERSION}-slim
id_tokens:
TBOT_GITLAB_JWT:
2023-08-29 23:37:02 +02:00
aud: tp.unjx.de
2023-06-27 14:56:31 +02:00
script:
- apt-get update && apt-get install curl -y
- cd /tmp
- 'curl -O https://cdn.teleport.dev/teleport-v${TELEPORT_VERSION}-linux-amd64-bin.tar.gz'
- tar -xvf teleport-v${TELEPORT_VERSION}-linux-amd64-bin.tar.gz
- ./teleport/install
2023-08-30 08:58:57 +02:00
- 'tbot start --token=gitlab --destination-dir=/tmp/tbot-user --data-dir=/tmp/tbot-data --auth-server=tp.unjx.de:443 --join-method=gitlab --oneshot'
2023-08-29 23:37:02 +02:00
- 'tsh -i /tmp/tbot-user/identity --proxy tp.unjx.de:443 ssh bot@berg "docker compose -f /opt/docker/home/docker-compose.yml up -d --pull always"'
- 'tsh -i /tmp/tbot-user/identity --proxy tp.unjx.de:443 ssh bot@berg "docker system prune --force"'
2023-06-27 15:55:35 +02:00
environment:
name: production
url: $PRODUCTION_URL