Commit 3cc64730 authored by Ryan Herbert's avatar Ryan Herbert

.gitlab-ci.yml add docker build and deploy job

Adds a ci job for building and testing a docker image and a job for
deploying a docker image
See #2881
parent 4b381462
......@@ -22,6 +22,7 @@ stages:
- valgrind_unit
- valgrind_functional
- prepare_deploy
- deploy_docker
- deploy_prod
# Anchors
......@@ -238,6 +239,21 @@ test_server_unit:
tags:
- web
test_server_functional:
stage: test_functional
script:
- cp -r browser/ docker/vidjil/source/ && cp -r server/ docker/vidjil/source/
- docker build -t $CI_BUILD_REF_SLUG docker/vidjil
- docker run $CI_BUILD_REF_SLUG /path/to/test
- rm -rf docker/vidjil/source/*
only:
- /^feature-.*s.*\/.*$/
- /^hotfix-.*s.*\/.*$/
- prod-server
- dev
tags:
- web
# Deployment
deploy_review:
......@@ -256,6 +272,17 @@ deploy_review:
tags:
- web
deploy_docker:
stage: deploy_docker
script:
- docker tag $CI_BUILD_REF_SLUG vidjil/vidjil:latest
- docker push vidjil/vidjil:latest
when: manual
only:
- prod-server
tags:
- web
deploy_prod:
stage: deploy_prod
script:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment