backend/.gitlab-ci.yml

25 lines
645 B
YAML
Raw Normal View History

2023-09-24 11:36:06 +00:00
stages:
- prepare
- build
- deploy
remove-old-services:
stage: prepare
script:
2023-11-12 09:59:05 +00:00
- systemctl --user stop little-lines-backend
- podman rm --force little-lines-backend
- cp little-lines-backend.container ~/.config/containers/systemd
- systemctl --user daemon-reload
2023-09-24 11:36:06 +00:00
container-build:
stage: build
script:
2023-11-12 15:39:40 +00:00
- sed -i "s/DATE/$(date -I)/g" ${CI_PROJECT_DIR}/server.js
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" ${CI_PROJECT_DIR}/server.js
2023-11-12 09:59:05 +00:00
- podman build -t little-lines-backend .
2023-09-24 11:36:06 +00:00
container-deploy:
stage: deploy
script:
2023-11-12 09:59:05 +00:00
- systemctl --user start little-lines-backend