Update .gitlab-ci.yml file

This commit is contained in:
Late Night Defender 2023-07-30 17:10:01 +00:00
parent 9b335ef7f8
commit baecb2a465

View file

@ -1,27 +1,24 @@
stages: # List of stages for jobs, and their order of execution
- prepare
- build
- test
- deploy
build-job: # This job runs in the build stage, which runs first.
stage: build
remove-old-services: # This job runs in the build stage, which runs first.
stage: prepare
script:
- echo "Compiling the code..."
- echo "Compile complete."
- podman stop little-lines
- podman rm little-lines
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
apply-version-tag:
stage: prepare
script:
- echo "Running unit tests... This will take about 60 seconds."
- sleep 60
- echo "Code coverage is 90%"
- 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
lint-test-job: # This job also runs in the test stage.
stage: test # It can run at the same time as unit-test-job (in parallel).
build-job: # This job runs in the test stage.
stage: build # It only starts when the job in the build stage completes successfully.
script:
- echo "Linting code... This will take about 10 seconds."
- sleep 10
- echo "No lint issues found."
- 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.