Skip to content
Snippets Groups Projects
Commit b026d826 authored by Laurent Petre's avatar Laurent Petre
Browse files

Run deployment jobs only in the parent project

Deployment jobs systematically - and expectedly - fail in the forked
projects, leading to confusing CI errors for the end user. Avoid the
confusion.
parent eb15c23a
No related branches found
No related tags found
1 merge request!24Run deployment jobs only in the parent project
...@@ -69,7 +69,7 @@ deploy preview: ...@@ -69,7 +69,7 @@ deploy preview:
- .deploy eos - .deploy eos
stage: deploy stage: deploy
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PROJECT_NAMESPACE == 'cmsgemonline/gem-ops' && $CI_PIPELINE_SOURCE == 'merge_request_event'
environment: environment:
name: preview-$CI_MERGE_REQUEST_IID name: preview-$CI_MERGE_REQUEST_IID
url: https://cmsgemonline.web.cern.ch/doc/preview-$CI_MERGE_REQUEST_IID url: https://cmsgemonline.web.cern.ch/doc/preview-$CI_MERGE_REQUEST_IID
...@@ -83,7 +83,7 @@ deploy preview:stop: ...@@ -83,7 +83,7 @@ deploy preview:stop:
extends: .deploy eos:stop extends: .deploy eos:stop
stage: deploy stage: deploy
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PROJECT_NAMESPACE == 'cmsgemonline/gem-ops' && $CI_PIPELINE_SOURCE == 'merge_request_event'
when: manual when: manual
allow_failure: true allow_failure: true
environment: environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment