ocaml-image.yml.in 838 Bytes
Newer Older
1 2 3 4 5 6 7
ocaml-image-%OCAML_VERSION%:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  variables:
    OCAML_VERSION: %OCAML_VERSION%
Louis Gesbert's avatar
Louis Gesbert committed
8
    LATEST_OCAML_VERSION: %LATEST_OCAML_VERSION%
9 10 11 12 13 14 15 16 17
  script:
    - |
      echo "{
        \"auths\": {
          \"$CI_REGISTRY\": {
            \"username\":\"$CI_REGISTRY_USER\",
            \"password\":\"$CI_REGISTRY_PASSWORD\"
      }}}
      " > /kaniko/.docker/config.json
18
    - /kaniko/executor --cache=true
Louis Gesbert's avatar
Louis Gesbert committed
19 20 21 22 23 24 25 26
        --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)

27 28
  only:
    - master