Loading {{cookiecutter.project_slug}}/templates/gitlab-ci-{{cookiecutter.project_slug}}.yml +23 −11 Original line number Diff line number Diff line Loading @@ -772,8 +772,11 @@ stages: # exclude if $CLEANUP_ALL_REVIEW set to 'force' - if: '$CLEANUP_ALL_REVIEW == "force"' when: never # only on non-production, non-integration branches, with ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == ""' when: never # only on non-production, non-integration branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # cleanup review env (automatically triggered once branches are deleted) {{ cookiecutter.template_prefix }}-cleanup-review: Loading @@ -793,8 +796,11 @@ stages: # exclude tags - if: $CI_COMMIT_TAG when: never # only on non-production, non-integration branches, with ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == ""' when: never # only on non-production, non-integration branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' when: manual allow_failure: true Loading @@ -813,8 +819,11 @@ stages: # TODO: use resource group resource_group: integration rules: # only on integration branch(es), with ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT && $CI_COMMIT_REF_NAME =~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT == ""' when: never # only on integration branch(es) - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF' # deploy to `staging` env (only on master branch) {{ cookiecutter.template_prefix }}-staging: Loading @@ -831,8 +840,11 @@ stages: # TODO: use resource group resource_group: staging rules: # only on production branch(es), with ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT && $CI_COMMIT_REF_NAME =~ $PROD_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT == ""' when: never # only on production branch(es) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF' # Deploy to production if on branch master and variable {{ cookiecutter.template_PREFIX }}_PROD_PROJECT defined and AUTODEPLOY_TO_PROD is set {{ cookiecutter.template_prefix }}-production: Loading @@ -851,12 +863,12 @@ stages: # TODO: use resource group resource_group: production rules: # exclude non-production branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF' when: never # exclude if ${{ cookiecutter.template_PREFIX }}_PROD_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_PROD_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_PROD_PROJECT == ""' when: never # exclude non-production branch(es) - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF' when: never - if: '${{ cookiecutter.template_PREFIX }}_PROD_DEPLOY_STRATEGY == "manual"' when: manual - if: '${{ cookiecutter.template_PREFIX }}_PROD_DEPLOY_STRATEGY == "auto"' Loading Loading
{{cookiecutter.project_slug}}/templates/gitlab-ci-{{cookiecutter.project_slug}}.yml +23 −11 Original line number Diff line number Diff line Loading @@ -772,8 +772,11 @@ stages: # exclude if $CLEANUP_ALL_REVIEW set to 'force' - if: '$CLEANUP_ALL_REVIEW == "force"' when: never # only on non-production, non-integration branches, with ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == ""' when: never # only on non-production, non-integration branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # cleanup review env (automatically triggered once branches are deleted) {{ cookiecutter.template_prefix }}-cleanup-review: Loading @@ -793,8 +796,11 @@ stages: # exclude tags - if: $CI_COMMIT_TAG when: never # only on non-production, non-integration branches, with ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT && $CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_REVIEW_PROJECT == ""' when: never # only on non-production, non-integration branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF && $CI_COMMIT_REF_NAME !~ $INTEG_REF' when: manual allow_failure: true Loading @@ -813,8 +819,11 @@ stages: # TODO: use resource group resource_group: integration rules: # only on integration branch(es), with ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT && $CI_COMMIT_REF_NAME =~ $INTEG_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_INTEG_PROJECT == ""' when: never # only on integration branch(es) - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF' # deploy to `staging` env (only on master branch) {{ cookiecutter.template_prefix }}-staging: Loading @@ -831,8 +840,11 @@ stages: # TODO: use resource group resource_group: staging rules: # only on production branch(es), with ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT set - if: '${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT && $CI_COMMIT_REF_NAME =~ $PROD_REF' # exclude if ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_STAGING_PROJECT == ""' when: never # only on production branch(es) - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF' # Deploy to production if on branch master and variable {{ cookiecutter.template_PREFIX }}_PROD_PROJECT defined and AUTODEPLOY_TO_PROD is set {{ cookiecutter.template_prefix }}-production: Loading @@ -851,12 +863,12 @@ stages: # TODO: use resource group resource_group: production rules: # exclude non-production branches - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF' when: never # exclude if ${{ cookiecutter.template_PREFIX }}_PROD_PROJECT not set - if: '${{ cookiecutter.template_PREFIX }}_PROD_PROJECT == null || ${{ cookiecutter.template_PREFIX }}_PROD_PROJECT == ""' when: never # exclude non-production branch(es) - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF' when: never - if: '${{ cookiecutter.template_PREFIX }}_PROD_DEPLOY_STRATEGY == "manual"' when: manual - if: '${{ cookiecutter.template_PREFIX }}_PROD_DEPLOY_STRATEGY == "auto"' Loading