Jenkinsfile 1.22 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/*'
16
      archiveArtifacts 'wok/testresults/*.png, wok/testresults/*.json'
Harald Sitter's avatar
Harald Sitter committed
17
      sh 'rm -f wok.tar wok.tar.xz'
Harald Sitter's avatar
Harald Sitter committed
18
      sh 'tar cfJ wok.tar.xz wok'
19
      archiveArtifacts 'wok.tar.xz'
20
      sh './contain.rb chown -R jenkins .'
21
    }
Harald Sitter's avatar
importy  
Harald Sitter committed
22 23 24 25 26 27
  }
}

def cleanNode(label = null, body) {
  node(label) {
    try {
28 29 30 31 32
// 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
33 34 35 36 37
      wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
        wrap([$class: 'TimestamperBuildWrapper']) {
          body()
        }
      }
Harald Sitter's avatar
Harald Sitter committed
38
    } finally {
39
      // step([$class: 'WsCleanup', cleanWhenFailure: true])
Harald Sitter's avatar
importy  
Harald Sitter committed
40 41 42
    }
  }
}