.gitlab-ci.yml 833 Bytes
Newer Older
Chris Hines's avatar
Chris Hines committed
1
2
3
stages:
  - build
  - deploy
Chris Hines's avatar
Chris Hines committed
4

Chris Hines's avatar
Chris Hines committed
5
build:
Chris Hines's avatar
Chris Hines committed
6
  image: ubuntu
Chris Hines's avatar
Chris Hines committed
7
8
  tags:
    build
Chris Hines's avatar
Chris Hines committed
9
  stage: build
Chris Hines's avatar
Chris Hines committed
10
  script:
Chris Hines's avatar
Chris Hines committed
11
    - apt update
Chris Hines's avatar
Chris Hines committed
12
    - apt install -y curl gnupg
13
    - curl -sL https://deb.nodesource.com/setup_12.x | bash -
Chris Hines's avatar
Chris Hines committed
14
    - apt update
Chris Hines's avatar
Chris Hines committed
15
    - apt install -y nodejs
Chris Hines's avatar
Chris Hines committed
16
    - rm ./package-lock.json
Chris Hines's avatar
Chris Hines committed
17
    - npm install 
18
    - ./node_modules/@angular/cli/bin/ng build  --prod --base-href=/ --configuration=$CI_COMMIT_REF_NAME
19
  artifacts:
Chris Hines's avatar
Chris Hines committed
20
21
    paths:
      - ./dist/
Chris Hines's avatar
Chris Hines committed
22
23

deploy_test:
Chris Hines's avatar
Chris Hines committed
24
  stage: deploy
Chris Hines's avatar
Chris Hines committed
25
26
  only:
    - test@hpc-team/strudelv2_spa
27
28
  tags: 
    - deploy_test
Chris Hines's avatar
Chris Hines committed
29
30
  script:
    - echo "deploying test"
Chris Hines's avatar
Chris Hines committed
31
32
    - ls -l
    - ./install.sh
Chris Hines's avatar
Chris Hines committed
33
34
  dependencies:
    - build
35
36

deploy_dev:
Chris Hines's avatar
Chris Hines committed
37
  stage: deploy
38
39
40
41
42
43
  only:
    - dev@hpc-team/strudelv2_spa
  tags: 
    - deploy_dev
  script:
    - echo "deploying dev"
Chris Hines's avatar
Chris Hines committed
44
    - ls -l
45
    - ./install.sh
Chris Hines's avatar
Chris Hines committed
46
47
  dependencies:
    - build