# Setting "sudo" to false forces Travis-CI to use its
# container-based build infrastructure, which has shorter
# queue times.
sudo: false

# Use the newer Travis-CI build templates based on the
# Debian Linux distribution "Trusty" release.
dist: trusty

# Select Go as the language used to run the buid.
language: go
go: 1.8.3
go_import_path: github.com/thecodeteam/gocsi

jobs:
  include:

      # Verify GoCSI builds without errors
      - stage:   build
        env:     PROG=gocsi.a
        install: true
        script:  make $PROG

      - stage:   build
        env:     PROG=csc
        install: true
        script:  make -C $PROG

      - stage:   build
        env:     PROG=mock
        install: true
        script:  make -C $PROG

      # Test GoCSI's csp.sh script by creating and serving new SP and
      # then using csc to invoke GetSupportedVersions and GetPluginInfo
      - stage:   test
        env:     JOB=csi-sp
        go:      1.9.3
        before_install: make dep
        install:        make -C csc
        script:         make csi-sp

      # Test GoCSI using the Mock CSI plug-in.
      - stage:   test
        env:     JOB=test
        go:      1.9.3
        install: make ginkgo
        script:  make test

  # Allow the csi-sp job to fail since it is only currently able to
  # use GoCSI's master branch due to golang/dep#1583.
  allow_failures:
    - env: JOB=csi-sp

# Setting "sudo" to false forces Travis-CI to use its
# container-based build infrastructure, which has shorter
# queue times.
sudo: false

# Use the newer Travis-CI build templates based on the
# Debian Linux distribution "Trusty" release.
dist: trusty

# Select Go as the language used to run the buid.
language: go
go: 1.8.3
go_import_path: github.com/thecodeteam/gocsi

jobs:
  include:

      # Verify GoCSI builds without errors
      - stage:   build
        env:     PROG=gocsi.a
        install: true
        script:  make $PROG

      - stage:   build
        env:     PROG=csc
        install: true
        script:  make -C $PROG

      - stage:   build
        env:     PROG=mock
        install: true
        script:  make -C $PROG

      # Test GoCSI's csp.sh script by creating and serving new SP and
      # then using csc to invoke GetSupportedVersions and GetPluginInfo
      - stage:   test
        env:     JOB=csi-sp
        go:      1.9.3
        before_install: make dep
        install:        make -C csc
        script:         make csi-sp

      # Test GoCSI using the Mock CSI plug-in.
      - stage:   test
        env:     JOB=test
        go:      1.9.3
        install: make ginkgo
        script:  make test

Revert "Allow failure of csi-sp build job"
Revert "Allow failure of csi-sp build job"

This reverts commit 5f388c034fbf8db2e652fc33ca2d8fe2fb4c719e.
