.gitlab-ci.yml 793 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
Wolfgang Knopki's avatar
Wolfgang Knopki committed
8
    - npm install
Rosanny Sihombing's avatar
Rosanny Sihombing committed
9
    - "pm2 delete --silent account || :"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
10
    - pm2 start ./built/app.js --name=account
Rosanny Sihombing's avatar
Rosanny Sihombing committed
11
12
13
14
    - 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
    - npm install
    - "pm2 delete --silent account || :"
    - pm2 start ./app.js --name=account
    - pm2 save
  tags: 
    - production
  only: 
Wolfgang Knopki's avatar
Wolfgang Knopki committed
31
    - master