Skip to content

Instantly share code, notes, and snippets.

@tejasrsuthar
Last active October 8, 2017 22:09
Show Gist options
  • Save tejasrsuthar/53fdd1c1a0ff3a226f86064752c854c7 to your computer and use it in GitHub Desktop.
Save tejasrsuthar/53fdd1c1a0ff3a226f86064752c854c7 to your computer and use it in GitHub Desktop.
Sample Pipeline configuration for Gitlab
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