Commit 37edc251 authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Add "latest" tag

parent 71215b1b
Pipeline #9288 failed with stages
in 20 seconds
......@@ -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:
......
......@@ -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
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