Jenkinsfile 1.19 KB
Newer Older
Harald Sitter's avatar
importy  
Harald Sitter committed
1 2 3 4
env.DIST = 'xenial'
env.TYPE = 'user'
env.PWD_BIND = '/workspace'

Harald Sitter's avatar
Harald Sitter committed
5
cleanNode('master') {
6
  ws('/tmp/kde-os-autoinst') {
7 8 9 10 11 12 13 14
    try {
      stage('clone') {
        git 'https://github.com/apachelogger/kde-os-autoinst'
      }
      stage('run') {
        sh './contain.rb /workspace/bootstrap.rb'
      }
    } finally {
Harald Sitter's avatar
Harald Sitter committed
15
      junit 'junit/*'
Harald Sitter's avatar
Harald Sitter committed
16
      sh 'rm -f wok.tar wok.tar.xz'
Harald Sitter's avatar
Harald Sitter committed
17
      sh 'tar cfJ wok.tar.xz wok'
Harald Sitter's avatar
Harald Sitter committed
18
      archiveArtifacts 'wok.tar.xz, wok/testresults/*.png, wok/testresults/*.json'
19
      sh './contain.rb chown -R jenkins .'
20
    }
Harald Sitter's avatar
importy  
Harald Sitter committed
21 22 23 24 25 26
  }
}

def cleanNode(label = null, body) {
  node(label) {
    try {
27 28 29 30 31
// Supremely bugged causing excessive slowdown in jenkins. not sure why.
// <org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper plugin="livescreenshot@1.4.5">
// <fullscreenFilename>screenshot.png</fullscreenFilename>
// <thumbnailFilename>screenshot-thumb.png</thumbnailFilename>
// </org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper>
Harald Sitter's avatar
importy  
Harald Sitter committed
32 33 34 35 36
      wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
        wrap([$class: 'TimestamperBuildWrapper']) {
          body()
        }
      }
Harald Sitter's avatar
Harald Sitter committed
37
    } finally {
38
      // step([$class: 'WsCleanup', cleanWhenFailure: true])
Harald Sitter's avatar
importy  
Harald Sitter committed
39 40 41
    }
  }
}