.gitlab-ci.yml 869 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
cache:
  paths:
    - node_modules/

stages:
  - init
  - deploy_qa
  - test_qa
  - deploy_prod

init:
  stage: init
  image: node:12.16.1
  script:
    - npm install

deploy_qa:
  image: node:12.16.1
  stage: deploy_qa
  script:
    - git push https://$HEROKU_USER:$HEROKU_API_KEY@git.heroku.com/julia-qa.git HEAD:master
    - echo "Deployed to qa server"
  environment:  
    name: qa
    url: https://julia-qa.herokuapp.com/
  only:
    - master

test_qa:
  stage: test_qa
  image: trion/ng-cli-e2e
  script:
    - ENV=qa npm run wdioTest

deploy_production:
  image: node:12.16.1
  stage: deploy_prod
  script:
    - git push https://$HEROKU_USER:$HEROKU_API_KEY@git.heroku.com/julia-test-prod.git HEAD:master
    - echo "Deployed to production server"
  environment:  
    name: production
    url: https://julia-test-prod.herokuapp.com/
  only:
    - master