Skip to content

Instantly share code, notes, and snippets.

@Chetic Chetic/jenkinsfile.groovy Secret
Created Feb 28, 2017

Embed
What would you like to do?
def runShell(String cmd) {
sh cmd
}
@NonCPS
def generateBranches() {
def splits = splitTests(count(2))
def branches = [:]
splits.eachWithIndex { exclusionList, index ->
echo 'Exclusion list ' + index
exclusionList.each {
echo '---'
echo it
}
branches["WTD${index}"] = {
echo 'WTD' + index + ' exclusion list: ' + exclusionList
runShell("xvfb-run -a ./wtdtest \"**/*WtdTest.class,${exclusionList.list.join('\n')}")
}
}
return branches
}
node('docker_host') {
stage('Checkout') {
p4sync credential: 'p4mw-credential', depotPath: '//syncra/dev/main_alignment3', populate: [$class: 'ForceCleanImpl', quiet: true]
}
def image
stage('Build Docker Image') {
image = docker.build("syncra/dev-main_alignment3:latest", "scripts/docker")
}
image.inside {
stage('Compile') {
sh 'make build_wsrv'
}
stage('WTD') {
parallel generateBranches()
}
stage('Archiving') {
archive 'wsrv/output/wtd/**/*.log, wsrv/output/wtd/**/*.txt'
junit '**/output/wtd/*/testRecords/unitreltests/*.xml'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.