github.com/influxdata/influxql@v1.1.0/Jenkinsfile (about)

     1  pipeline {
     2    agent {
     3      docker {
     4        image 'golang:1.9.2'
     5      }
     6    }
     7  
     8    stages {
     9      stage('Test') {
    10        steps {
    11          sh """
    12          rm -f $WORKSPACE/test-results.{log,xml}
    13          mkdir -p /go/src/github.com/influxdata
    14          cp -a $WORKSPACE /go/src/github.com/influxdata/influxql
    15  
    16          cd /go/src/github.com/influxdata/influxql
    17          go get -v -t
    18          go test -v | tee $WORKSPACE/test-results.log
    19          """
    20        }
    21  
    22        post {
    23          always {
    24            sh """
    25            if [ -e test-results.log ]; then
    26              go get github.com/jstemmer/go-junit-report
    27              go-junit-report < $WORKSPACE/test-results.log > test-results.xml
    28            fi
    29            """
    30            junit "test-results.xml"
    31          }
    32        }
    33      }
    34    }
    35  }