|
| 1 | +#!groovy |
| 2 | +pipeline { |
| 3 | + agent { label 'public' } |
| 4 | + options { |
| 5 | + timeout(time: 60, unit: 'MINUTES') |
| 6 | + } |
| 7 | + stages { |
| 8 | + stage('Tests') { |
| 9 | + parallel { |
| 10 | + stage('Base') { |
| 11 | + agent { label 'public' } |
| 12 | + steps { |
| 13 | + sh ''' |
| 14 | + set -euo pipefail |
| 15 | + export GOPATH="$WORKSPACE" |
| 16 | + export GOBIN="$GOPATH/bin" |
| 17 | + export GOSRC="$GOPATH/src" |
| 18 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 19 | + make all-CI |
| 20 | + ''' |
| 21 | + } |
| 22 | + post { |
| 23 | + always { |
| 24 | + sh ''' |
| 25 | + set -euo pipefail |
| 26 | + export GOPATH="$WORKSPACE" |
| 27 | + export GOBIN="$GOPATH/bin" |
| 28 | + export GOSRC="$GOPATH/src" |
| 29 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 30 | + ./scripts/jenkins_cleanup.sh |
| 31 | + ''' |
| 32 | + } |
| 33 | + } |
| 34 | + } |
| 35 | + stage('L3') { |
| 36 | + agent { label 'public' } |
| 37 | + steps { |
| 38 | + sh ''' |
| 39 | + set -euo pipefail |
| 40 | + export GOPATH="$WORKSPACE" |
| 41 | + export GOBIN="$GOPATH/bin" |
| 42 | + export GOSRC="$GOPATH/src" |
| 43 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 44 | + make l3-test |
| 45 | + ''' |
| 46 | + } |
| 47 | + post { |
| 48 | + always { |
| 49 | + sh ''' |
| 50 | + set -euo pipefail |
| 51 | + export GOPATH="$WORKSPACE" |
| 52 | + export GOBIN="$GOPATH/bin" |
| 53 | + export GOSRC="$GOPATH/src" |
| 54 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 55 | + CONTIV_NODES=3 CONTIV_L3=1 vagrant destroy -f |
| 56 | + ''' |
| 57 | + } |
| 58 | + } |
| 59 | + } |
| 60 | + stage('Kubernetes') { |
| 61 | + agent { label 'public' } |
| 62 | + steps { |
| 63 | + sh ''' |
| 64 | + set -euo pipefail |
| 65 | + export GOPATH="$WORKSPACE" |
| 66 | + export GOBIN="$GOPATH/bin" |
| 67 | + export GOSRC="$GOPATH/src" |
| 68 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 69 | + make k8s-test |
| 70 | + ''' |
| 71 | + } |
| 72 | + post { |
| 73 | + always { |
| 74 | + sh ''' |
| 75 | + set -euo pipefail |
| 76 | + export GOPATH="$WORKSPACE" |
| 77 | + export GOBIN="$GOPATH/bin" |
| 78 | + export GOSRC="$GOPATH/src" |
| 79 | + export PATH="$PATH:/sbin/:/usr/local/go/bin:$GOBIN:$GOPATH/netplugin/bin" |
| 80 | + make k8s-destroy |
| 81 | + ''' |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + } |
| 88 | +} |
0 commit comments