| Current Path : /proc/thread-self/root/home/deltalab/PMS/partner-manager-backend/ |
| Current File : //proc/thread-self/root/home/deltalab/PMS/partner-manager-backend/.gitlab-ci.yml |
stages:
- pre-flight
- test
- staging
- production
variables:
GIT_SUBMODULE_STRATEGY: recursive
#SSH_PRIVATE_KEY: $DEPLOY_KEY
# Whatever setup is needed to prepare for all the stages
pre-flight:
stage: pre-flight
only:
- develop
- master
script:
# We all know what this does
- npm install
# Launch all the tests for the project
test:
stage: test
only:
- develop
- master
variables:
# The pre-flight shoud already get us a copy of the branch
GIT_STRATEGY: none
before_script:
# Make sure that Mocha is executable
- chmod 0777 ./node_modules/.bin/mocha
script:
# Launch all the tests of the project
- npm test
# Compile and prepare for the deploy on the Staging network on the stage machine (Poseidon)
staging:
stage: staging
only:
- develop
variables:
# The pre-flight shoud already get us a copy of the branch
GIT_STRATEGY: none
script:
#- git archive --remote=git@atlante:indaco/pms/env-files.git HEAD:staging/pms-be/ .env | tar -x
- cd ../docker-deploy
- docker-compose down
- docker image rm stage-pms-be
- cd ../partner-manager-backend
- mv ../envs/staging/pms-be/.env ./.env
- docker build -t stage-pms-be .
- cd ../docker-deploy
#- git archive --remote=git@atlante:indaco/pms/docker-deployment.git HEAD docker-compose.yml | tar -x
- docker-compose -f staging-platform.yml up -d
# Compile and prepare for the deploy on the Staging network on the stage machine (Poseidon)
production:
stage: production
only:
- master
variables:
# The pre-flight shoud already get us a copy of the branch
GIT_STRATEGY: none
script:
#- git archive --remote=git@atlante:indaco/pms/env-files.git HEAD:production/pms-be/ .env | tar -x
- cd ../docker-deploy
- docker-compose down
- docker image rm pms-be
- cd ../partner-manager-backend
- mv ../env-files/production/pms-be/.env ./.env
- docker build -t pms-be .
- cd ..
#- git archive --remote=git@atlante:indaco/pms/docker-deployment.git HEAD docker-compose.yml | tar -x
- docker-compose -f production-platform.yml up -d