Jenkinsfile.plasma.test 1.84 KB
Newer Older
1
env.DIST = 'bionic'
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
env.PWD_BIND = '/workspace'
env.TYPE = 'useredition' // FIXME: hardcoded for now

if (env.TYPE == null) {
  if (params.TYPE != null) {
    env.TYPE = params.TYPE
  } else {
    type = inferType()
    if (type != null) {
      env.TYPE = type
    }
  }
}

if (env.TYPE == null) {
  error 'TYPE param not set. Cannot run install test without a type.'
}

20
// WARNING: these override the XML configs when run!
21
properties([
22
  disableConcurrentBuilds(),
23
  pipelineTriggers([upstream(threshold: 'UNSTABLE',
24
                             upstreamProjects: "iso_neon_${env.OPENQA_SERIES}_${TYPE}_amd64")]),
25 26 27 28 29 30
  pipelineTriggers([cron('0 H(9-22) * * *')])
])

fancyNode('openqa') {
  try {
    stage('clone') {
31
      git 'git://anongit.kde.org/sysadmin/neon-openqa.git'
32 33 34 35 36 37 38 39 40 41
    }
    stage('rake-test') {
      sh 'rake test'
    }
    stage('test-plasma') {
      wrap([$class: 'LiveScreenshotBuildWrapper', fullscreenFilename: 'wok/qemuscreenshot/last.png']) {
        sh 'PLASMA_DESKTOP=1 bin/contain.rb /workspace/bin/bootstrap.rb'
      }
    }
  } finally {
42
    dir('metadata') { archiveArtifacts '*' }
43
    dir('wok') { archiveArtifacts allowEmptyArchive: true, artifacts: 'testresults/*, ulogs/*, video.*, vars.json, slide.html' }
44 45
    junit 'junit/*'
    sh 'bin/contain.rb chown -R jenkins .'
46
    cleanWs()
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  }
}

def fancyNode(label = null, body) {
  node(label) {
    wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
      wrap([$class: 'TimestamperBuildWrapper']) {
        body()
      }
    }
  }
}

// When not called from an ISO build we'll want to infer the type from our own name.
def inferType() {
  if (!env.JOB_NAME) {
    return null
  }
Harald Sitter's avatar
Harald Sitter committed
65
  String[] types = ["useredition", "userltsedition", "devedition-gitunstable", "devedition-gitstable"]
66 67 68 69 70 71 72
  for (type in types) {
    if (env.JOB_NAME.contains(type)) {
      return type
    }
  }
  return null
}