Commit 72c1549e authored by Vadym Gidulian's avatar Vadym Gidulian

Added support of GitLab Environments and Route Map

parent 29790d13
variables: stages:
PROJECT_NAME: $CI_PROJECT_NAME - build
- deploy
test: build:
stage: deploy stage: build
script: script:
- node -v - node -v
- npm -v - npm -v
- npm run build - npm run build
- rsync -rv --delete dist/ $GVIA_TEST_DIR/$PROJECT_NAME/ tags:
- npm
artifacts:
paths:
- dist/
deploy:review:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- rsync -rv --delete dist/ /test/$CI_PROJECT_NAME--$CI_BUILD_REF_SLUG/
dependencies:
- build
tags:
- gviagroup-deploy
environment:
name: review/$CI_BUILD_REF_NAME
url: http://$CI_BUILD_REF_SLUG.$CI_PROJECT_NAME.test.$DOMAIN
on_stop: undeploy:review
only: only:
- branches
except:
- master
- dev - dev
demo:
deploy:testing:
stage: deploy stage: deploy
variables:
GIT_STRATEGY: none
script: script:
- node -v - rsync -rv --delete dist/ /test/$CI_PROJECT_NAME/
- npm -v dependencies:
- npm run build - build
- rsync -rv --delete dist/ $GVIA_DEMO_DIR/$PROJECT_NAME/ tags:
- gviagroup-deploy
environment:
name: testing
url: http://$CI_PROJECT_NAME.test.$DOMAIN
on_stop: undeploy:testing
only:
- dev
deploy:staging:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- rsync -rv --delete dist/ /demo/$CI_PROJECT_NAME/
dependencies:
- build
tags:
- gviagroup-deploy
environment:
name: staging
url: http://$CI_PROJECT_NAME.demo.$DOMAIN
on_stop: undeploy:staging
only:
- master
undeploy:review:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- rm -rf /test/$CI_PROJECT_NAME--$CI_BUILD_REF_SLUG
when: manual
tags:
- gviagroup-deploy
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
only:
- branches
except:
- master
- dev
undeploy:testing:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- rm -rf /test/$CI_PROJECT_NAME
when: manual
tags:
- gviagroup-deploy
environment:
name: testing
action: stop
only:
- dev
undeploy:staging:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- rm -rf /demo/$CI_PROJECT_NAME
when: manual
tags:
- gviagroup-deploy
environment:
name: staging
action: stop
only: only:
- master - master
- source: /src\/(css|less)\/.+/
public: 'css/style.all.min.css'
- source: /src\/img\/(.+)/
public: 'img/\1'
- source: /src\/js\/.+/
public: 'js/script.all.min.js'
- source: /src\/pug\/(?!includes\/)(.+)\.pug/
public: '\1.html'
- source: /src\/(.+\.html)/
public: '\1'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment