ci(gitlab): trigger job in curben/curben.gitlab.io

- https://docs.gitlab.com/ee/ci/multi_project_pipelines.html
This commit is contained in:
MDLeom 2020-12-12 21:49:13 +00:00
parent 7417d07159
commit 9f49be13cc
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 15 additions and 4 deletions

View File

@ -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