Commit 5980b18a authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Revert "Revert "Explicit everything :(""

This reverts commit 4a420fd8.
parent 4a420fd8
Pipeline #12120 failed with stage
in 81 minutes and 42 seconds
make-targets: # make-targets:
stage: .pre # stage: .pre
image: alpine:3.11 # image: alpine:3.11
script: # script:
- apk add curl jq # - apk add curl jq
- curl https://api.github.com/repos/ocaml/ocaml/releases # - curl https://api.github.com/repos/ocaml/ocaml/releases
| 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
- | # - |
{ for v in $(cat versions); do # { for v in $(cat versions); do
echo "ocaml-image-$v:"; # echo "ocaml-image-$v:";
echo " extends: .ocaml-image"; # echo " extends: .ocaml-image";
echo " variables:"; # echo " variables:";
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)";
} > ocaml-images.yml # } > ocaml-images.yml
artifacts: # artifacts:
paths: # paths:
- ocaml-images.yml # - ocaml-images.yml
build-images: # build-images:
# stage: build
# variables:
# trigger:
# include:
# - local: ocaml-images-gen.yml
# - artifact: ocaml-images.yml
# job: make-targets
# strategy: depend
# only:
# - master
.ocaml-image:
stage: build stage: build
trigger: image:
include: name: gcr.io/kaniko-project/executor:debug
- local: ocaml-images-gen.yml entrypoint: [""]
- artifact: ocaml-images.yml script:
job: make-targets - |
strategy: depend echo "{
\"auths\": {
\"$CI_REGISTRY\": {
\"username\":\"$CI_REGISTRY_USER\",
\"password\":\"$CI_REGISTRY_PASSWORD\"
}}}
" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true
--context=$CI_PROJECT_DIR
--dockerfile=$CI_PROJECT_DIR/Dockerfile
--build-arg=OCAML_VERSION=$OCAML_VERSION
--build-arg=LAST_REPO_UPDATE=$(date +%s)
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION%.*}-$(date +%F)
$(if [ "$OCAML_VERSION" = "$LATEST_OCAML_VERSION" ]; then
echo "--destination=$CI_REGISTRY_IMAGE:latest";
fi)
only: only:
- master - master
ocaml-image-4.02.3:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.02.3
ocaml-image-4.03.0:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.03.0
ocaml-image-4.04.2:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.04.2
ocaml-image-4.05.0:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.05.0
ocaml-image-4.06.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.06.1
ocaml-image-4.07.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.07.1
ocaml-image-4.08.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.08.1
ocaml-image-4.09.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.09.1
ocaml-image-4.10.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.10.1
ocaml-image-4.11.1:
extends: .ocaml-image
variables:
OCAML_VERSION: 4.11.1
variables:
LATEST_OCAML_VERSION: 4.11.1
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