mirror of
https://gitlab.com/little-lines/frontend.git
synced 2024-11-24 23:06:52 +00:00
Update .gitlab-ci.yml file
This commit is contained in:
parent
f31f118d59
commit
7221586818
1 changed files with 6 additions and 6 deletions
|
@ -1,23 +1,23 @@
|
||||||
stages: # List of stages for jobs, and their order of execution
|
stages:
|
||||||
- prepare
|
- prepare
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
remove-old-services: # This job runs in the build stage, which runs first.
|
remove-old-services:
|
||||||
stage: prepare
|
stage: prepare
|
||||||
script:
|
script:
|
||||||
- podman stop little-lines
|
- podman stop little-lines
|
||||||
- podman rm little-lines
|
- podman rm little-lines
|
||||||
|
|
||||||
build-job: # This job runs in the test stage.
|
container-build:
|
||||||
stage: build # It only starts when the job in the build stage completes successfully.
|
stage: build
|
||||||
script:
|
script:
|
||||||
- sed -i "s/DATE/$(date -I)/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
|
- 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
|
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" ${CI_PROJECT_DIR}/src/views/Setting.vue
|
||||||
- podman build -t little-lines:$(git log -1 --oneline | awk '{print $1}') .
|
- podman build -t little-lines:$(git log -1 --oneline | awk '{print $1}') .
|
||||||
|
|
||||||
deploy-job: # This job runs in the deploy stage.
|
container-deploy:
|
||||||
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- podman run --name little-lines -p 8081:80 -d little-lines:$(git log -1 --oneline | awk '{print $1}')
|
- podman run --name little-lines -p 8081:80 -d little-lines:$(git log -1 --oneline | awk '{print $1}')
|
||||||
- podman generate systemd little-lines > ~/.config/systemd/user/little-lines.service
|
- podman generate systemd little-lines > ~/.config/systemd/user/little-lines.service
|
||||||
|
|
Loading…
Reference in a new issue