diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2406ec85..017817e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,12 @@ stages: - - deploy_stage + - build + - deploy - failed_stage image: alpine:latest # Use the latest version of Alpine Linux docker image -deploy_job: - stage: deploy_stage +build_job: + stage: build before_script: - 'which ssh-agent || (apk update && apk add curl openssh-client git grep)' @@ -47,6 +48,16 @@ deploy_job: paths: - tmp/ +deploy_job: # Trigger deploy job on curben/malware-filter + stage: deploy + trigger: + project: curben/malware-filter + branch: master + strategy: depend + rules: + - if: '$CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")' + when: always + failed_job: stage: failed_stage @@ -74,5 +85,5 @@ failed_job: rules: - if: '$CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")' - # Run this job only when deploy_job failed + # Run this job only when preceding jobs failed when: on_failure