.gitlab-ci.yml 931 Bytes
Newer Older
Nicholas J Anderson's avatar
Nicholas J Anderson committed
1 2
image: node:6.5.0

3 4 5 6
stages:
  - build
  - deploy

Nicholas J Anderson's avatar
Nicholas J Anderson committed
7 8
build:
  stage: build
9
  variables:
10
    API_GET_FACILITIES: "'https://api.srct.gmu.edu/whatsopen/v2/facilities/'"
Nicholas J Anderson's avatar
Nicholas J Anderson committed
11
  script:
12 13
  - npm install
  - CI=false API_GET_FACILITIES=$API_GET_FACILITIES npm run build
Nicholas J Anderson's avatar
Nicholas J Anderson committed
14 15 16
  artifacts:
    paths:
    - build
17

Nicholas J Anderson's avatar
Nicholas J Anderson committed
18 19 20
build_shopmason:
  stage: build
  variables:
21
    API_GET_FACILITIES: "'https://api.srct.gmu.edu/whatsopen/v2/facilities/?facility_classifier=shopmason'"
Nicholas J Anderson's avatar
Nicholas J Anderson committed
22
  script:
23 24
  - npm install
  - CI=false API_GET_FACILITIES=$API_GET_FACILITIES npm run build
Nicholas J Anderson's avatar
Nicholas J Anderson committed
25 26 27 28
  artifacts:
    paths:
    - build
  when: manual
Nicholas J Anderson's avatar
Nicholas J Anderson committed
29

30 31 32 33 34 35 36
deploy_staging:
  stage: deploy
  script: echo "Deploy bot awayyyyy"
  environment:
    name: staging
    url: https://whatsopen.gmu.io
  only:
37
    - development
38 39 40 41 42 43 44 45 46 47

deploy_production:
  stage: deploy
  script: echo "Deploy bot awayyyyy"
  environment:
    name: production
    url: https://whatsopen.gmu.edu
  when: manual
  only:
    - master
48