Last active
October 8, 2017 22:09
-
-
Save tejasrsuthar/53fdd1c1a0ff3a226f86064752c854c7 to your computer and use it in GitHub Desktop.
Sample Pipeline configuration for Gitlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:6.10.3 | |
stages: | |
- init | |
- tests | |
- deploy | |
- production | |
init: | |
stage: init | |
script: | |
- npm cache clean | |
- rm -rf node-modules | |
- npm install | |
run_tests: | |
stage: tests | |
script: | |
- npm install mocha | |
- npm test | |
deploy_staging: | |
stage: deploy | |
script: | |
- git remote add heroku https://heroku:[email protected]/test-staging.git | |
- git push heroku master | |
- echo "Code deployed to staging server" | |
environment: | |
name: staging | |
url: https://test-ci-staging.herokuapp.com/ | |
only: | |
- master | |
deploy_production: | |
stage: production | |
script: | |
- git remote add heroku https://heroku:[email protected]/test-production.git | |
- git push heroku master | |
- echo "Code deployed to production server" | |
environment: | |
name: production | |
url: https://test-ci-production.herokuapp.com/ | |
when: manual | |
only: | |
- master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment