Login to the Docker Registry within the script, drop non-mandatory variables

This commit is contained in:
flow.gunso
2019-03-25 11:10:03 +01:00
parent a52559ddb3
commit f69483354a
2 changed files with 12 additions and 6 deletions

View File

@@ -22,6 +22,9 @@ if [ $CI_PIPELINE_SOURCE != "push" ]; then
exit 1
fi
# Login with Docker Registry.
echo $CI_REGISTRY_BOT_PASSWORD | docker login -u $CI_REGISTRY_BOT_USERNAME docker.io --password-stdin
# Build and push as staging.
docker build -t $CI_REGISTRY_IMAGE:staging .
docker push $CI_REGISTRY_IMAGE:staging
docker build -t index.docker.io/$CI_REGISTRY_IMAGE:staging .
docker push index.docker.io/$CI_REGISTRY_IMAGE:staging