Commit 8ef4c0dd authored by Rahix's avatar Rahix 🦀
Browse files

Merge 'Add deploy job to CI/CD'

See merge request !22
parents d7e0def6 bec18796
......@@ -3,6 +3,7 @@ image: "engel-simulator-builder:latest"
stages:
- check
- build
- deploy
cache: &global_cache
paths:
......@@ -50,3 +51,12 @@ build-release:
- www/dist
only:
- master
deploy:
stage: deploy
tags:
- local
script:
- "cp -r www/dist/* /var/www/game"
only:
- master
......@@ -6,6 +6,10 @@
- Register using `gitlab-runner register`
- See https://docs.gitlab.com/runner/register/
- Use `docker` executor
- Register a second, protected runner
- Use `shell` executor
- Tag it as `local`
- Set it as protected (see https://docs.gitlab.com/ee/ci/runners/README.html#prevent-runners-from-revealing-sensitive-information)
## Build local docker image
To speed up the build, we use a customized docker image.
......@@ -18,7 +22,7 @@ The easiest way is to build the image locally:
`docker build game/ci -t engel-simulator-builder`
## Enable local docker images
The GitLab runner will always try to pull images from docker hub by default. To use local images, you must enable this in `nano /etc/gitlab-runner/config.toml`.
The GitLab runner will always try to pull images from docker hub by default. To use local images, you must enable this in `/etc/gitlab-runner/config.toml`.
Here, add `pull_policy = "if-not-present"` to the `[runners.docker]` section.
......
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