This repository has been archived on 2024-07-10. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/.gitlab-ci.yml

29 lines
968 B
YAML

stages: # List of stages for jobs, and their order of execution
- prepare
- build
- deploy
remove-old-services: # This job runs in the build stage, which runs first.
stage: prepare
script:
- podman stop little-lines
- podman rm little-lines
apply-version-tag:
stage: prepare
script:
- sed -i "s/DATE/$(date -I)/g" src/views/Setting.vue
- sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" src/views/Setting.vue
build-job: # This job runs in the test stage.
stage: build # It only starts when the job in the build stage completes successfully.
script:
- podman build -t little-lines:$(git log -1 --oneline | awk '{print $1}') .
deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
environment: production
script:
- echo "Deploying application..."
- echo "Application successfully deployed."