klayout/Jenkinsfile

66 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-06-23 09:45:06 +02:00
2018-06-24 10:11:46 +02:00
@Library("osconfig") _
2020-03-29 10:41:27 +02:00
properties([disableConcurrentBuilds()])
2018-06-24 10:36:19 +02:00
// from shared library
target = osconfig()
2018-06-24 10:15:35 +02:00
2018-06-24 11:45:15 +02:00
currentBuild.description = "Pipelined " + target
2018-06-23 09:45:06 +02:00
node("master") {
2018-06-24 10:45:08 +02:00
artefacts = pwd() + "/artefacts"
target_dir = artefacts + "/" + target
2018-06-23 09:45:06 +02:00
2018-06-24 10:45:08 +02:00
stage("Checkout sources") {
checkout scm
checkout_private()
2018-06-24 10:45:08 +02:00
}
stage("Building target ${target}") {
2018-06-23 09:45:06 +02:00
withDockerContainer(image: "jenkins-${target}") {
2018-06-24 11:45:15 +02:00
// from shared library
build(target, target_dir)
2018-06-23 09:45:06 +02:00
}
2018-06-24 10:45:08 +02:00
}
2018-06-23 09:45:06 +02:00
2018-06-24 10:45:08 +02:00
stage("Publish and test") {
2018-06-23 09:45:06 +02:00
parallel(
2018-06-24 10:36:19 +02:00
"Publish": {
// from shared library - only publish for normal branch, not for PR
if (! BRANCH_NAME.startsWith('PR')) {
publish(BRANCH_NAME, target, target_dir)
}
2018-06-24 10:36:19 +02:00
},
2018-06-23 09:45:06 +02:00
"Unit testing": {
ut_result = "no-result"
2018-06-24 10:45:08 +02:00
withDockerContainer(image: "jenkins-${target}") {
ut_result = run_ut(target)
2018-06-24 10:45:08 +02:00
}
2018-06-23 09:45:06 +02:00
junit(testResults: ut_result)
2018-06-23 09:45:06 +02:00
},
"Installtest": {
2018-06-24 10:45:08 +02:00
withDockerContainer(image: "jenkins-${target}-basic") {
2018-06-24 11:45:15 +02:00
// from shared library
2022-12-18 01:16:46 +01:00
installtest_nopython(target, target_dir)
2018-06-24 10:45:08 +02:00
}
2018-06-23 09:45:06 +02:00
})
2018-06-24 10:45:08 +02:00
}
2018-06-23 09:45:06 +02:00
}