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

deploy-master:    
  stage: deploy
  script:
    - cat $configfileprod > ./config/config.js
21
22
23
    - 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
24
25
26
27
28
29
30
31
    - npm install
    - "pm2 delete --silent account || :"
    - pm2 start ./app.js --name=account
    - pm2 save
  tags: 
    - production
  only: 
    - master