Skip to content
Snippets Groups Projects
Verified Commit a11056e6 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[CI] Allow base image to be hosted on the production registry

parent 78308d73
No related branches found
No related tags found
No related merge requests found
......@@ -72,10 +72,15 @@ build:
tags: [build]
image: $REGISTRY_PROD/pica-ci-base
before_script:
- echo $REGISTRY_PASSWORD | docker login $REGISTRY -u $REGISTRY_USERNAME --password-stdin
# First login on the production registry, in case the image is based on a other registry image
- echo $REGISTRY_PROD_PASSWORD | docker login $REGISTRY_PROD -u $REGISTRY_PROD_USERNAME --password-stdin
- source variables
script:
# Build the image
- docker build -f $MODIFIED_IMAGE/Dockerfile $MODIFIED_IMAGE -t $MODIFIED_IMAGE_FULL_TEST
- docker logout $REGISTRY_PROD
# Then login on the test registry and push the image
- echo $REGISTRY_PASSWORD | docker login $REGISTRY -u $REGISTRY_USERNAME --password-stdin
- docker push $MODIFIED_IMAGE_FULL_TEST
after_script:
- docker logout $REGISTRY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment