Update .gitlab-ci.yml file

This commit is contained in:
2025-12-04 23:45:06 +01:00
parent 9f8adb8617
commit 79ea47836b

View File

@@ -39,7 +39,7 @@ build-job: # This job runs in the build stage, which runs first.
clean-job: # This job runs in the build stage, which runs first.
stage: clean
script:
- ls -la /home/gitlab-runner/builds/*
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
rules:
- if: '$CI_COMMIT_MESSAGE =~ /build/'
@@ -47,7 +47,7 @@ cleanup_on_failure_job:
stage: clean # Should be in a later stage than the job that might fail
when: on_failure # <-- This is the key keyword
script:
- ls -la /home/gitlab-runner/builds/*
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
notify:
stage: notify # Should be in a later stage than the job that might fail
@@ -56,6 +56,7 @@ notify:
- column=':'
- echo "${flow_id}"
- curl -XPOST http://192.168.77.101:8123/api/webhook/voice-notifications-tC_8YKxMJIAaQRV5riKuC7Zl --data-raw 'message=build job completed'
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
notify2:
stage: notify # Should be in a later stage than the job that might fail
@@ -64,6 +65,7 @@ notify2:
- column=':'
- echo "${flow_id}"
- curl -XPOST http://192.168.77.101:8123/api/webhook/voice-notifications-tC_8YKxMJIAaQRV5riKuC7Zl --data-raw 'message=build job failed'
- rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp
rules:
- if: '$CI_COMMIT_MESSAGE =~ /build/'