Commit 7b6ef526 authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Fix caching for staging

Remove caching for production
parent 8464719b
......@@ -18,8 +18,8 @@ build to staging:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
- docker info
script:
- docker pull ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}$ --tag ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --build-arg CACHE_DATE=${CI_PIPELINE_CREATED_AT} .
- docker pull ${CI_REGISTRY_IMAGE}:staging || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:staging --tag ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} --build-arg CACHE_DATE=${CI_PIPELINE_CREATED_AT} .
- docker push ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
rules:
......@@ -34,7 +34,6 @@ build to production:
- docker login -u ai_toolkit -p ${AI_TOOLKIT_TOKEN} gitlab-registry.mpcdf.mpg.de
- docker info
script:
- docker pull ${CI_REGISTRY_IMAGE}:latest || true
- docker build --tag ${CI_REGISTRY_IMAGE}:production${CI_COMMIT_SHORT_SHA} --tag ${APP_REGISTRY}:analytics --tag ${APP_REGISTRY}:analytics${CI_COMMIT_SHORT_SHA} --tag ${CI_REGISTRY_IMAGE}:latest .
- docker push ${CI_REGISTRY_IMAGE}:production${CI_COMMIT_SHORT_SHA}
- docker push ${APP_REGISTRY}:analytics${CI_COMMIT_SHORT_SHA}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment