2023-07-30 18:13:42 +00:00
|
|
|
stages:
|
2023-07-30 17:10:01 +00:00
|
|
|
- prepare
|
2023-07-30 16:13:47 +00:00
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
2023-07-30 18:13:42 +00:00
|
|
|
remove-old-services:
|
2023-07-30 17:10:01 +00:00
|
|
|
stage: prepare
|
2023-07-30 16:13:47 +00:00
|
|
|
script:
|
2023-07-30 17:10:01 +00:00
|
|
|
- podman stop little-lines
|
|
|
|
- podman rm little-lines
|
2023-07-30 16:13:47 +00:00
|
|
|
|
2023-07-30 18:13:42 +00:00
|
|
|
container-build:
|
|
|
|
stage: build
|
2023-07-30 16:13:47 +00:00
|
|
|
script:
|
2023-07-30 18:02:59 +00:00
|
|
|
- sed -i "s/DATE/$(date -I)/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
|
|
|
|
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
|
2023-07-31 16:36:53 +00:00
|
|
|
- podman build -t little-lines .
|
2023-07-30 16:13:47 +00:00
|
|
|
|
2023-07-30 18:13:42 +00:00
|
|
|
container-deploy:
|
|
|
|
stage: deploy
|
2023-07-30 16:13:47 +00:00
|
|
|
script:
|
2023-07-31 16:36:53 +00:00
|
|
|
- podman run --name little-lines -p 8081:80 -d little-lines
|
2023-07-30 17:21:52 +00:00
|
|
|
- podman generate systemd little-lines > ~/.config/systemd/user/little-lines.service
|
|
|
|
- systemctl --user daemon-reload
|
|
|
|
- systemctl --user enable little-lines
|