Skip to content
Snippets Groups Projects
Commit 5a48b20a authored by Andres Anaya Amariels's avatar Andres Anaya Amariels :rocket:
Browse files

rules

parent 9513b98f
No related branches found
No related tags found
No related merge requests found
...@@ -28,13 +28,6 @@ variables: ...@@ -28,13 +28,6 @@ variables:
tags: tags:
- shell - shell
.staging_post_mr: &staging_post_mr
tags:
- shell
rules:
- if: '$CI_COMMIT_REF_NAME == "staging"'
when: always
.dev_common: &dev_common .dev_common: &dev_common
tags: tags:
- shell - shell
...@@ -118,9 +111,11 @@ delete_ocf_staging: ...@@ -118,9 +111,11 @@ delete_ocf_staging:
### staging branch merged ### ### staging branch merged ###
deploy_ocf_oficial_staging: deploy_ocf_oficial_staging:
stage: deploy_ocf_oficial_staging stage: deploy_ocf_oficial_staging
rules:
- if: '$CI_COMMIT_REF_NAME == "staging"'
when: always
needs: needs:
- staging_build_and_push_mr - staging_build_and_push_mr
<<: *staging_post_mr
environment: environment:
name: review/oficial-staging name: review/oficial-staging
url: https://capif-staging.$DOMAIN_STAGING url: https://capif-staging.$DOMAIN_STAGING
......
...@@ -17,20 +17,14 @@ variables: ...@@ -17,20 +17,14 @@ variables:
CAPIF_DOCKER_REGISTRY: $CAPIF_DOCKER_REGISTRY CAPIF_DOCKER_REGISTRY: $CAPIF_DOCKER_REGISTRY
.staging_common: &staging_common .staging_common: &staging_common
rules: only:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "staging"' - merge_requests
when: always except:
variables:
- $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "staging"
tags: tags:
- shell - shell
.staging_mr: &staging_mr
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == "staging"'
when: always
tags:
- shell
.staging_dnd: &staging_dnd .staging_dnd: &staging_dnd
allow_failure: true allow_failure: true
rules: rules:
...@@ -329,6 +323,9 @@ staging_build_and_push: ...@@ -329,6 +323,9 @@ staging_build_and_push:
### staging branch merged ### ### staging branch merged ###
staging_build_and_push_mr: staging_build_and_push_mr:
stage: staging_build_and_push_mr stage: staging_build_and_push_mr
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == "staging"'
when: always
script: script:
- export TMP_PWD=$PWD - export TMP_PWD=$PWD
- echo "TMP_PWD=$TMP_PWD" - echo "TMP_PWD=$TMP_PWD"
...@@ -405,5 +402,4 @@ staging_build_and_push_mr: ...@@ -405,5 +402,4 @@ staging_build_and_push_mr:
- docker build -t $CI_REGISTRY/ocf/capif/staging/helper:staging . - docker build -t $CI_REGISTRY/ocf/capif/staging/helper:staging .
- docker push $CI_REGISTRY/ocf/capif/staging/helper:staging - docker push $CI_REGISTRY/ocf/capif/staging/helper:staging
- echo "----------------------------------------------------" - echo "----------------------------------------------------"
- docker logout $CI_REGISTRY - docker logout $CI_REGISTRY
<<: *staging_mr \ No newline at end of file
\ No newline at end of file
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