Jenkinsfile 703 Bytes
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 7 8 9 10 11 12
  ws('/tmp/kde-os-autoinst') {
    stage('clone') {
      git 'https://github.com/apachelogger/kde-os-autoinst'
    }
    stage('run') {
      sh './contain.rb /workspace/bootstrap.rb'
    }
Harald Sitter's avatar
importy  
Harald Sitter committed
13 14 15 16 17 18 19 20 21 22 23 24
  }
}

def cleanNode(label = null, body) {
  node(label) {
    try {
      wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
        wrap([$class: 'TimestamperBuildWrapper']) {
          body()
        }
      }
    } finally {
25 26
      sh 'tar -cf wok.tar wok'
      archiveArtifacts 'wok.tar'
Harald Sitter's avatar
Harald Sitter committed
27
      sh './contain.rb chown -R jenkins .'
28
      // step([$class: 'WsCleanup', cleanWhenFailure: true])
Harald Sitter's avatar
importy  
Harald Sitter committed
29 30 31
    }
  }
}