From 9f49be13cc2557d91c10c56a8d7657b653f9304b Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 12 Dec 2020 21:49:13 +0000 Subject: [PATCH] ci(gitlab): trigger job in curben/curben.gitlab.io - https://docs.gitlab.com/ee/ci/multi_project_pipelines.html --- .gitlab-ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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