Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
OCamlPro
ocaml-docker-images
Commits
2790d300
Commit
2790d300
authored
Jan 22, 2021
by
Louis Gesbert
Browse files
Add target to push to Docker Hub
parent
5980b18a
Pipeline
#12269
failed with stage
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
.gitlab-ci.yml
.gitlab-ci.yml
+11
-1
No files found.
.gitlab-ci.yml
View file @
2790d300
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
image
:
image
:
name
:
gcr.io/kaniko-project/executor:debug
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
entrypoint
:
[
"
"
]
variables
:
DOCKERHUB_IMAGE
:
hub.docker.com/ocamlpro/ocaml
script
:
script
:
-
|
-
|
echo "{
echo "{
...
@@ -47,7 +49,11 @@
...
@@ -47,7 +49,11 @@
\"$CI_REGISTRY\": {
\"$CI_REGISTRY\": {
\"username\":\"$CI_REGISTRY_USER\",
\"username\":\"$CI_REGISTRY_USER\",
\"password\":\"$CI_REGISTRY_PASSWORD\"
\"password\":\"$CI_REGISTRY_PASSWORD\"
}}}
},
\"hub.docker.com\": {
\"auth\":\"$DOCKERHUB_AUTH\"
}
}}
" > /kaniko/.docker/config.json
" > /kaniko/.docker/config.json
-
/kaniko/executor --cache=true
-
/kaniko/executor --cache=true
--context=$CI_PROJECT_DIR
--context=$CI_PROJECT_DIR
...
@@ -55,10 +61,14 @@
...
@@ -55,10 +61,14 @@
--build-arg=OCAML_VERSION=$OCAML_VERSION
--build-arg=OCAML_VERSION=$OCAML_VERSION
--build-arg=LAST_REPO_UPDATE=$(date +%s)
--build-arg=LAST_REPO_UPDATE=$(date +%s)
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION}
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION%.*}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
--destination=$DOCKERHUB_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
$(if [ "$OCAML_VERSION" = "$LATEST_OCAML_VERSION" ]; then
$(if [ "$OCAML_VERSION" = "$LATEST_OCAML_VERSION" ]; then
echo "--destination=$CI_REGISTRY_IMAGE:latest";
echo "--destination=$CI_REGISTRY_IMAGE:latest";
echo "--destination=$DOCKERHUB_IMAGE:latest";
fi)
fi)
only
:
only
:
-
master
-
master
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment