Skip to content
Snippets Groups Projects
Commit 0b21f60d authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

feat: add deployr rec to gitlab-ci

parent ffd48d50
Branches
Tags
1 merge request!11Recette
......@@ -15,6 +15,7 @@ build:
stage: build
only:
- master
- recette
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" --build-arg conf=prod .
......@@ -31,7 +32,7 @@ build_dev:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:dev" --build-arg conf=dev .
- docker push "$CI_REGISTRY_IMAGE:dev"
build_json_server:
image: docker:18.09
services:
......@@ -43,7 +44,7 @@ build_json_server:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:json_server" ./api/
- docker push "$CI_REGISTRY_IMAGE:json_server"
deploy_dev:
stage: deploy
tags:
......@@ -56,6 +57,18 @@ deploy_dev:
- docker-compose pull web-app
- docker-compose up -d web-app
deploy_rec:
stage: deploy
tags:
- deploy
only:
- recette
script:
- cd /home/mps/ram
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose pull web-app
- docker-compose up -d web-app
code_analysis:
image: skilldlabs/sonar-scanner:3.4.0
services:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment