Skip to content
Snippets Groups Projects
Verified Commit 9cb3d297 authored by Gonzalo Servat's avatar Gonzalo Servat
Browse files

feat: add deploy host condition to the rules

parent b3ccd044
No related branches found
No related tags found
1 merge request!842feat: add deploy host condition to the rules
Pipeline #1679910457 passed
Pipeline: Example Service

#1679914258

    ......@@ -98,8 +98,6 @@ variables:
    stage: check_and_preflight
    script:
    - if [[ "$PROVISIONED_SERVICE_PROJECT_ID" != "$SOURCE_PROJECT_ID" ]]; then echo "Failing pipeline as it was triggered from a project that isn't the service project"; exit 1; fi
    # Only allowed to run dry-run on the non-deployment server host
    - if [[ "$RUNWAY_DEPLOY_HOST" != "$CI_SERVER_HOST" ]] && [[ "$RUNWAY_DEPLOYMENT_STRATEGY" != "dryrun" ]]; then echo "Failing pipeline as this deployment is configured to deploy only on ${RUNWAY_DEPLOY_HOST}"; exit 1; fi
    ⌚ $[[ inputs.environment | expand_vars ]] Change Lock Check:
    stage: check_and_preflight
    ......@@ -150,7 +148,7 @@ variables:
    - if: $RUNWAY_DEPLOYMENT_ACTION == "manual"
    when: manual
    allow_failure: true
    - if: $RUNWAY_DEPLOYMENT_STRATEGY != "dryrun" && $RUNWAY_DEPLOYMENT_STRATEGY != "destroy"
    - if: $RUNWAY_DEPLOYMENT_STRATEGY != "dryrun" && $RUNWAY_DEPLOYMENT_STRATEGY != "destroy" && $RUNWAY_DEPLOY_HOST == $CI_SERVER_HOST
    extends:
    - .oidc_base_gcp
    - .deploy
    ......@@ -164,7 +162,7 @@ variables:
    rules:
    - if: $RUNWAY_EXECUTE_JOB
    when: never
    - if: $RUNWAY_DEPLOYMENT_STRATEGY != "dryrun" && $RUNWAY_DEPLOYMENT_STRATEGY != "destroy"
    - if: $RUNWAY_DEPLOYMENT_STRATEGY != "dryrun" && $RUNWAY_DEPLOYMENT_STRATEGY != "destroy" && $RUNWAY_DEPLOY_HOST == $CI_SERVER_HOST
    extends:
    - .vault
    - .oidc_base_gcp
    ......@@ -217,7 +215,7 @@ variables:
    rules:
    - if: $DESTROY_RUNWAY_WORKLOAD != "EVERYTHING" && $DESTROY_RUNWAY_WORKLOAD != $RUNWAY_SERVICE_ID
    when: never
    - if: $RUNWAY_DEPLOYMENT_STRATEGY == "destroy" && $DESTROY_RUNWAY_WORKLOAD
    - if: $RUNWAY_DEPLOYMENT_STRATEGY == "destroy" && $DESTROY_RUNWAY_WORKLOAD && $RUNWAY_DEPLOY_HOST == $CI_SERVER_HOST
    environment:
    name: "${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