Commit aac677ff authored by Vadym Gidulian's avatar Vadym Gidulian

Added support of GitLab Environments and Route Map

parent e256d9b2
variables:
PROJECT_NAME: $CI_PROJECT_NAME
stages:
- deploy
test:
deploy:review:
stage: deploy
script:
- rm -rf .git .gitignore .gitlab-ci.yml
- rsync -rv --delete ./ $GVIA_TEST_DIR/$PROJECT_NAME/
- rm -rf .git .gitignore .gitlab .gitlab-ci.yml
- rsync -rv --delete ./ /test/$CI_PROJECT_NAME--$CI_BUILD_REF_SLUG/
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:
- branches
except:
- master
- dev
deploy:testing:
stage: deploy
script:
- rm -rf .git .gitignore .gitlab .gitlab-ci.yml
- rsync -rv --delete dist/ /test/$CI_PROJECT_NAME/
tags:
- gviagroup-deploy
environment:
name: testing
url: http://$CI_PROJECT_NAME.test.$DOMAIN
on_stop: undeploy:testing
only:
- dev
demo:
deploy:staging:
stage: deploy
script:
- rm -rf .git .gitignore .gitlab .gitlab-ci.yml
- rsync -rv --delete dist/ /demo/$CI_PROJECT_NAME/
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 .git .gitignore .gitlab-ci.yml
- rsync -rv --delete ./ $GVIA_DEMO_DIR/$PROJECT_NAME/
- rm -rf /demo/$CI_PROJECT_NAME
when: manual
tags:
- gviagroup-deploy
environment:
name: staging
action: stop
only:
- master
- source: /^(((?!^\.git\/|^\.gitignore|^\.gitlab\/|^\.gitlab-ci\.yml).)*)$/
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