Commit b2085791 authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Automatically use latest opam release

parent e9adfb0b
Pipeline #12410 failed with stages
in 17 seconds
...@@ -7,6 +7,10 @@ make-targets: ...@@ -7,6 +7,10 @@ make-targets:
| jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")' | jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")'
| tail -n +3 | tail -n +3
> versions > versions
- curl https://api.github.com/repos/ocaml/opam/releases
| jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")'
| tail -n 1
> opam-version
- | - |
{ for v in $(cat versions); do { for v in $(cat versions); do
echo "ocaml-image-$v:"; echo "ocaml-image-$v:";
...@@ -15,8 +19,9 @@ make-targets: ...@@ -15,8 +19,9 @@ make-targets:
echo " OCAML_VERSION: $v"; echo " OCAML_VERSION: $v";
echo; echo;
done; done;
echo "variables:" echo "variables:";
echo " LATEST_OCAML_VERSION: $(tail -n1 versions)"; echo " LATEST_OCAML_VERSION: $(tail -n1 versions)";
echo " OPAM_VERSION: $(cat opam-version)";
} > ocaml-images.yml } > ocaml-images.yml
artifacts: artifacts:
paths: paths:
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
- /kaniko/executor --cache=true - /kaniko/executor --cache=true
--context=$CI_PROJECT_DIR --context=$CI_PROJECT_DIR
--dockerfile=$CI_PROJECT_DIR/Dockerfile --dockerfile=$CI_PROJECT_DIR/Dockerfile
--build-arg=OPAM_VERSION=$OPAM_VERSION
--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}
......
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