.gitlab-ci.yml 826 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
    - rm -rf ./node_modules
    - npm i --omit=dev
Rosanny Sihombing's avatar
Rosanny Sihombing committed
6
7
8
9
    - 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
10
    - "pm2 delete --silent account || :"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
11
    - pm2 start ./built/app.js --name=account
Rosanny Sihombing's avatar
Rosanny Sihombing committed
12
13
14
15
    - pm2 save
  tags: 
    - testing
  only: 
16
    - testing
Wolfgang Knopki's avatar
Wolfgang Knopki committed
17
18
19
20
21

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