fix: Roll prebuild and app dependencies stages together
This commit is contained in:
parent
39f508b297
commit
d7351ac34f
1 changed files with 3 additions and 19 deletions
|
@ -1,7 +1,6 @@
|
|||
stages:
|
||||
- application_dependencies
|
||||
- asset_dependencies
|
||||
- prebuild
|
||||
- asset_dependencies
|
||||
- test
|
||||
- deploy_tags
|
||||
- deploy
|
||||
|
@ -20,7 +19,7 @@ variables:
|
|||
# across jobs and pipelines. Note that elixir deps need to go first, because
|
||||
# we need the phoenix and phoenix_html hex packages to install their JS.
|
||||
fetch_application_dependencies:
|
||||
stage: application_dependencies
|
||||
stage: prebuild
|
||||
image: "elixir:1.10"
|
||||
cache:
|
||||
key:
|
||||
|
@ -34,6 +33,7 @@ fetch_application_dependencies:
|
|||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- mix deps.compile
|
||||
- mix compile
|
||||
# Make results available to other jobs
|
||||
artifacts:
|
||||
paths:
|
||||
|
@ -64,21 +64,6 @@ fetch_asset_dependencies:
|
|||
exclude:
|
||||
- apps/app/assets/node_modules
|
||||
|
||||
prebuild:
|
||||
stage: prebuild
|
||||
image: "elixir:1.10"
|
||||
needs:
|
||||
- fetch_application_dependencies
|
||||
cache:
|
||||
- key:
|
||||
files:
|
||||
- mix.lock
|
||||
paths:
|
||||
- _build/
|
||||
- deps/
|
||||
script:
|
||||
- mix compile
|
||||
|
||||
# Test stage. Runs various tests and speculatively builds docker image in
|
||||
# parallel, in case the build passes.
|
||||
test:
|
||||
|
@ -125,7 +110,6 @@ build_image_for_commit:
|
|||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
# This copies the elixir build artifacts for deps and app so that we can cache them
|
||||
- docker cp `docker create $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA`:/root/app/_build/prod _build
|
||||
- la -la _build/
|
||||
|
||||
# If tests pass, tag the commit and update package versions
|
||||
deploy_to_tags:
|
||||
|
|
Loading…
Reference in a new issue