diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 28b390d..e5fbe90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/' \ No newline at end of file