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
37edc251
Commit
37edc251
authored
May 04, 2020
by
Louis Gesbert
Browse files
Add "latest" tag
parent
71215b1b
Pipeline
#9288
failed with stages
in 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
.gitlab-ci.yml
.gitlab-ci.yml
+3
-1
ocaml-image.yml.in
ocaml-image.yml.in
+9
-4
No files found.
.gitlab-ci.yml
View file @
37edc251
...
...
@@ -7,7 +7,9 @@ make-targets:
| jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")'
> versions
-
for v in $(cat versions); do
sed "s/%OCAML_VERSION%/$v/g" ocaml-image.yml.in >> ocaml-images.yml;
sed "s/%OCAML_VERSION%/$v/g; s/%LATEST_OCAML_VERSION%/$(tail -n1 versions)/g"
ocaml-image.yml.in
>> ocaml-images.yml;
done
artifacts
:
paths
:
...
...
ocaml-image.yml.in
View file @
37edc251
...
...
@@ -5,6 +5,7 @@ ocaml-image-%OCAML_VERSION%:
entrypoint: [""]
variables:
OCAML_VERSION: %OCAML_VERSION%
LATEST_OCAML_VERSION: %LATEST_OCAML_VERSION%
script:
- |
echo "{
...
...
@@ -15,9 +16,13 @@ ocaml-image-%OCAML_VERSION%:
}}}
" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true --reproducible
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--build-arg OCAML_VERSION=$OCAML_VERSION
--destination $CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
--context=$CI_PROJECT_DIR
--dockerfile=$CI_PROJECT_DIR/Dockerfile
--build-arg=OCAML_VERSION=$OCAML_VERSION
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
$(if [ "$OCAML_VERSION" = "$LATEST_OCAML_VERSION" ]; then
echo "--destination=$CI_REGISTRY_IMAGE:latest";
fi)
only:
- 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