.gitlab-ci.yml 775 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:
Rosanny Sihombing's avatar
Rosanny Sihombing committed
4
5
6
7
    - 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
8
    - "pm2 delete --silent account || :"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
9
    - pm2 start ./built/app.js --name=account
Rosanny Sihombing's avatar
Rosanny Sihombing committed
10
11
12
13
    - pm2 save
  tags: 
    - testing
  only: 
14
    - testing
Wolfgang Knopki's avatar
Wolfgang Knopki committed
15
16
17
18
19

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