Jenkinsfile 1.08 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 15 16 17
    try {
      stage('clone') {
        git 'https://github.com/apachelogger/kde-os-autoinst'
      }
      stage('run') {
        sh './contain.rb /workspace/bootstrap.rb'
      }
    } finally {
      sh 'tar -cf wok.tar wok'
      archiveArtifacts 'wok.tar'
      sh './contain.rb chown -R jenkins .'
18
    }
Harald Sitter's avatar
importy  
Harald Sitter committed
19 20 21 22 23 24
  }
}

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