fix: Copy scripts to docker image before running them

This commit is contained in:
Robert Prehn 2021-04-24 12:28:45 -05:00
parent 27aab5aa63
commit bfb539ae17
2 changed files with 3 additions and 2 deletions

View file

@ -42,6 +42,7 @@ build_image_for_commit:
- docker pull $CI_REGISTRY_IMAGE:latest || true
# This enables fast parallel builds
- export DOCKER_BUILDKIT=1
- mkdir -p _build/prod
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
# Push the commit SHA tagged version to registry. We will later choose to tag that as stable
# if everything passes.

View file

@ -26,8 +26,9 @@ ADD ./apps/admin/mix.exs /root/app/apps/admin/
ADD ./apps/app/mix.exs /root/app/apps/app/
ADD ./apps/content/mix.exs /root/app/apps/content/
ADD ./apps/core/mix.exs /root/app/apps/core/
ADD ./_build/ /root/app/_build/
ADD ./_build/${MIX_ENV}/ /root/app/_build/${MIX_ENV}/
ADD ./deps/ /root/app/deps/
ADD ./script/ /root/app/script/
RUN script/restore-timestamps
RUN mix deps.get
RUN mix deps.compile
@ -49,7 +50,6 @@ FROM elixir1
ADD ./apps /root/app/apps
# Resume compilation of the elixir app
ADD ./script /root/app/script
RUN MAKE=cmake mix compile
# Copy in the built assets & fingerprint them