.gitlab-ci.yml 993 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
  - npm install -g yarn
13
  - yarn install
14
  - CI=false REACT_APP_API_GET_FACILITIES=$API_GET_FACILITIES npm run build
Nicholas J Anderson's avatar
Nicholas J Anderson committed
15
16
17
  artifacts:
    paths:
    - build
18

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

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

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