Matteo Scandolo | 51b7630 | 2020-02-05 12:07:23 -0800 | [diff] [blame^] | 1 | /* voltha-scale-measurements pipeline */ |
| 2 | pipeline { |
| 3 | |
| 4 | /* no label, executor is determined by JJB */ |
| 5 | agent { |
| 6 | label "${params.buildNode}" |
| 7 | } |
| 8 | stages { |
| 9 | stage('checkout') { |
| 10 | steps { |
| 11 | checkout([ |
| 12 | $class: 'GitSCM', |
| 13 | userRemoteConfigs: [[ url: "https://github.com/ciena/kind-voltha.git", ]], |
| 14 | branches: [[ name: "master", ]], |
| 15 | extensions: [ |
| 16 | [$class: 'WipeWorkspace'], |
| 17 | [$class: 'RelativeTargetDirectory', relativeTargetDir: "${params.projectName}"], |
| 18 | [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false], |
| 19 | ], |
| 20 | ]) |
| 21 | script { |
| 22 | git_tags = sh(script:"cd $projectName; git tag -l --points-at HEAD", returnStdout: true).trim() |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | stage('start') { |
| 27 | steps { |
| 28 | sh """ |
| 29 | #!/usr/bin/env bash |
| 30 | set -euo pipefail |
| 31 | |
| 32 | echo "DO SOMETHING" |
| 33 | """ |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | post { |
| 38 | cleanup { |
| 39 | sh ''' |
| 40 | WAIT_ON_DOWN=y ./voltha down |
| 41 | cd $WORKSPACE/ |
| 42 | rm -rf kind-voltha/ || true |
| 43 | ''' |
| 44 | } |
| 45 | } |
| 46 | } |