.gitlab-ci.yml 832 Bytes
Newer Older
Wolfgang Knopki's avatar
Wolfgang Knopki committed
1
deploy-testing:    
Rosanny Sihombing's avatar
Rosanny Sihombing committed
2
3
4
  stage: deploy
  script:
    - npm install
Rosanny Sihombing's avatar
Rosanny Sihombing committed
5
6
7
8
9
10
    - npm run clean
    - npm run build
    - cat $configfiledev > ./built/config/config.js
    - cat $cert > ./built/routes/cert/cert.pem
    - cat $certidp > ./built/routes/cert/cert_idp.pem
    - cat $key > ./built/routes/cert/key.pem
Rosanny Sihombing's avatar
Rosanny Sihombing committed
11
    - "pm2 delete --silent account || :"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
12
    - pm2 start ./built/app.js --name=account
Rosanny Sihombing's avatar
Rosanny Sihombing committed
13
14
15
16
    - pm2 save
  tags: 
    - testing
  only: 
17
    - testing
Wolfgang Knopki's avatar
Wolfgang Knopki committed
18
19
20
21
22

deploy-master:    
  stage: deploy
  script:
    - cat $configfileprod > ./config/config.js
23
24
25
    - cat $cert > ./routes/cert/cert.pem
    - cat $certidp > ./routes/cert/cert_idp.pem
    - cat $key > ./routes/cert/key.pem
Wolfgang Knopki's avatar
Wolfgang Knopki committed
26
27
28
29
30
31
32
33
    - npm install
    - "pm2 delete --silent account || :"
    - pm2 start ./app.js --name=account
    - pm2 save
  tags: 
    - production
  only: 
    - master