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:
|
stages:
|
||||||
- application_dependencies
|
|
||||||
- asset_dependencies
|
|
||||||
- prebuild
|
- prebuild
|
||||||
|
- asset_dependencies
|
||||||
- test
|
- test
|
||||||
- deploy_tags
|
- deploy_tags
|
||||||
- deploy
|
- deploy
|
||||||
|
@ -20,7 +19,7 @@ variables:
|
||||||
# across jobs and pipelines. Note that elixir deps need to go first, because
|
# 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.
|
# we need the phoenix and phoenix_html hex packages to install their JS.
|
||||||
fetch_application_dependencies:
|
fetch_application_dependencies:
|
||||||
stage: application_dependencies
|
stage: prebuild
|
||||||
image: "elixir:1.10"
|
image: "elixir:1.10"
|
||||||
cache:
|
cache:
|
||||||
key:
|
key:
|
||||||
|
@ -34,6 +33,7 @@ fetch_application_dependencies:
|
||||||
- mix local.rebar --force
|
- mix local.rebar --force
|
||||||
- mix deps.get
|
- mix deps.get
|
||||||
- mix deps.compile
|
- mix deps.compile
|
||||||
|
- mix compile
|
||||||
# Make results available to other jobs
|
# Make results available to other jobs
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -64,21 +64,6 @@ fetch_asset_dependencies:
|
||||||
exclude:
|
exclude:
|
||||||
- apps/app/assets/node_modules
|
- 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
|
# Test stage. Runs various tests and speculatively builds docker image in
|
||||||
# parallel, in case the build passes.
|
# parallel, in case the build passes.
|
||||||
test:
|
test:
|
||||||
|
@ -125,7 +110,6 @@ build_image_for_commit:
|
||||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
# This copies the elixir build artifacts for deps and app so that we can cache them
|
# 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
|
- 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
|
# If tests pass, tag the commit and update package versions
|
||||||
deploy_to_tags:
|
deploy_to_tags:
|
||||||
|
|
Loading…
Reference in a new issue