Commit 2790d300 authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Add target to push to Docker Hub

parent 5980b18a
Pipeline #12269 failed with stage
in 56 seconds
......@@ -40,6 +40,8 @@
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
DOCKERHUB_IMAGE: hub.docker.com/ocamlpro/ocaml
script:
- |
echo "{
......@@ -47,7 +49,11 @@
\"$CI_REGISTRY\": {
\"username\":\"$CI_REGISTRY_USER\",
\"password\":\"$CI_REGISTRY_PASSWORD\"
}}}
},
\"hub.docker.com\": {
\"auth\":\"$DOCKERHUB_AUTH\"
}
}}
" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true
--context=$CI_PROJECT_DIR
......@@ -55,10 +61,14 @@
--build-arg=OCAML_VERSION=$OCAML_VERSION
--build-arg=LAST_REPO_UPDATE=$(date +%s)
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION}
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION%.*}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
$(if [ "$OCAML_VERSION" = "$LATEST_OCAML_VERSION" ]; then
echo "--destination=$CI_REGISTRY_IMAGE:latest";
echo "--destination=$DOCKERHUB_IMAGE:latest";
fi)
only:
- master
......
Markdown is supported
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