.gitlab-ci.yml 734 Bytes
Newer Older
1 2 3
make-targets:
  stage: .pre
  image: alpine:3.11
Louis Gesbert's avatar
Louis Gesbert committed
4
  script:
5 6 7
    - apk add curl jq
    - 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(".")'
8
        | tail -n +3
9
        > versions
Louis Gesbert's avatar
Louis Gesbert committed
10
    - sed "s/%LATEST_OCAML_VERSION%/$(tail -n1 versions)/g" ocaml-image.yml.pre > ocaml-images.yml
11
    - for v in $(cat versions); do
Louis Gesbert's avatar
Louis Gesbert committed
12
          sed "s/%OCAML_VERSION%/$v/g" ocaml-image.yml.in >> ocaml-images.yml;
13 14 15 16 17 18 19 20 21 22 23 24
        done
  artifacts:
    paths:
      - ocaml-images.yml

build-images:
  stage: build
  trigger:
    include:
      - artifact: ocaml-images.yml
        job: make-targets
    strategy: depend
Louis Gesbert's avatar
Louis Gesbert committed
25 26
  only:
    - master