File: Jenkinsfile

package info (click to toggle)
golang-github-influxdata-influxql 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 632 kB
  • sloc: makefile: 2
file content (35 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pipeline {
  agent {
    docker {
      image 'golang:1.9.2'
    }
  }

  stages {
    stage('Test') {
      steps {
        sh """
        rm -f $WORKSPACE/test-results.{log,xml}
        mkdir -p /go/src/github.com/influxdata
        cp -a $WORKSPACE /go/src/github.com/influxdata/influxql

        cd /go/src/github.com/influxdata/influxql
        go get -v -t
        go test -v | tee $WORKSPACE/test-results.log
        """
      }

      post {
        always {
          sh """
          if [ -e test-results.log ]; then
            go get github.com/jstemmer/go-junit-report
            go-junit-report < $WORKSPACE/test-results.log > test-results.xml
          fi
          """
          junit "test-results.xml"
        }
      }
    }
  }
}