mirror of
https://github.com/elyby/accounts.git
synced 2024-11-10 07:22:00 +05:30
Improve caching for the build step
This commit is contained in:
parent
d333798919
commit
663cfd9dbc
@ -5,7 +5,7 @@ stages:
|
||||
- cleanup
|
||||
|
||||
.defineVersion: &defineVersion |-
|
||||
export VERSION="${CI_COMMIT_TAG:-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}}"
|
||||
export VERSION="${CI_COMMIT_TAG:-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA:0:7}}"
|
||||
.loginIntoRegistry: &loginIntoRegistry |-
|
||||
docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
||||
|
||||
@ -82,6 +82,7 @@ build:production:
|
||||
--pull
|
||||
--target web
|
||||
--build-arg "build_env=prod"
|
||||
--cache-from "$APP_IMAGE_NAME:latest"
|
||||
--cache-from "$WEB_IMAGE_NAME:latest"
|
||||
-t "$WEB_IMAGE_NAME:$CI_PIPELINE_ID" .
|
||||
- >
|
||||
@ -89,6 +90,7 @@ build:production:
|
||||
--pull
|
||||
--target db
|
||||
--build-arg "build_env=prod"
|
||||
--cache-from "$APP_IMAGE_NAME:latest"
|
||||
--cache-from "$DB_IMAGE_NAME:latest"
|
||||
-t "$DB_IMAGE_NAME:$CI_PIPELINE_ID" .
|
||||
only:
|
||||
|
Loading…
Reference in New Issue
Block a user