dennybaa
3/30/2016 - 7:16 AM

matrix.yml

test:
  override:
    - ? | 
          circle-matrix <<"EHD"
            env:
              - VERSION=centos6
              - VERSION=centos7
              - VERSION=fedora22
              - VERSION=fedora23

            before_script:
              - env | sort
              - cd "$VERSION"
              - export image="$IMAGE:$VERSION"

            script:
              - test "$(head -n1 Dockerfile)" = "FROM $image-scm"
                && test "$(head -n1 scm/Dockerfile)" = "FROM $image-curl"
                && [[ "$(head -n1 curl/Dockerfile)" == 'FROM centos:'*
                   || "$(head -n1 curl/Dockerfile)" == 'FROM fedora:'* ]]
              - docker build -t "$image-curl" curl
              - docker build -t "$image-scm" scm
              - docker build -t "$image" .
              - ~/official-images/test/run.sh "$image"

            after_script:
              - docker images
          EHD
      :
        parallel: true