From f7b0c10ba93d37b7cd50124e7aa46c540add1157 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 21 Aug 2020 18:21:09 +0300 Subject: [PATCH] Allow to deploy to the dev from non-master branch [deploy dev] --- .gitlab-ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index af48893..2341180 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -191,7 +191,7 @@ Storybook: - sentry-cli releases deploys $VERSION new -e $CI_ENVIRONMENT_NAME - sentry-cli releases finalize $VERSION -Deploy dev: +Dev: extends: - .deployJob environment: @@ -199,11 +199,15 @@ Deploy dev: variables: VM_HOST_NAME: playground.ely.local VM_DEPLOY_PATH: /srv/dev.account.ely.by/frontend - only: - refs: - - master + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - if: '$CI_COMMIT_MESSAGE =~ /\[deploy dev\]/' + when: on_success + # Default: + - when: never -Deploy prod: +Prod: extends: - .deployJob stage: deploy @@ -217,4 +221,5 @@ Deploy prod: when: never - if: '$CI_COMMIT_MESSAGE =~ /\[deploy\]/' when: on_success + # Default: - when: manual