fix: Use restore-timestamps inside docker image
This commit is contained in:
parent
2418bb9d5c
commit
e160a73d21
4 changed files with 5 additions and 4 deletions
|
@ -38,7 +38,6 @@ build_image_for_commit:
|
|||
services:
|
||||
- name: docker:20.10-dind
|
||||
script:
|
||||
- script/ci/restore-timestamps
|
||||
- docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||
# This enables fast parallel builds
|
||||
|
@ -49,7 +48,6 @@ build_image_for_commit:
|
|||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
# Pull out the built _build/prod directory so we can cache it!
|
||||
- docker cp `docker create $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA`:/root/app/_build/prod _build
|
||||
- script/ci/restore-timestamps
|
||||
|
||||
# If tests pass, tag the commit and update package versions
|
||||
deploy_to_tags:
|
||||
|
|
|
@ -28,6 +28,7 @@ ADD ./apps/content/mix.exs /root/app/apps/content/
|
|||
ADD ./apps/core/mix.exs /root/app/apps/core/
|
||||
ADD ./_build/ /root/app/_build/
|
||||
ADD ./deps/ /root/app/deps/
|
||||
RUN script/restore-timestamps
|
||||
RUN mix deps.get
|
||||
RUN mix deps.compile
|
||||
|
||||
|
@ -55,4 +56,6 @@ RUN MAKE=cmake mix compile
|
|||
COPY --from=1 /root/app/apps/app/priv/static/ /root/app/apps/app/priv/static
|
||||
RUN mix phx.digest
|
||||
|
||||
RUN script/restore-timestamps
|
||||
|
||||
CMD ["mix", "phx.server"]
|
||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
|||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
|
||||
script/ci/restore-timestamps
|
||||
script/restore-timestamps
|
||||
|
||||
mix deps.get
|
||||
mix ecto.create
|
||||
|
@ -14,4 +14,4 @@ mix ecto.migrate
|
|||
|
||||
mix test
|
||||
|
||||
script/ci/restore-timestamps
|
||||
script/restore-timestamps
|
||||
|
|
Loading…
Reference in a new issue