mirror of https://github.com/KLayout/klayout.git
New Jenkinsfile (testing)
This commit is contained in:
parent
663ccf4ad7
commit
7e5ab4dddf
|
|
@ -8,21 +8,27 @@ currentBuild.description = "Pipelined "+target
|
||||||
|
|
||||||
node("master") {
|
node("master") {
|
||||||
|
|
||||||
branch = 'staging'
|
branch = 'staging'
|
||||||
artefacts = pwd() + "/artefacts"
|
artefacts = pwd() + "/artefacts"
|
||||||
src_dir = pwd()
|
src_dir = pwd()
|
||||||
|
|
||||||
target_dir = artefacts + "/" + target
|
target_dir = artefacts + "/" + target
|
||||||
work_dir = pwd() + "/" + target
|
work_dir = pwd() + "/" + target
|
||||||
|
|
||||||
stage("Building target ${target}")
|
stage("Checkout sources") {
|
||||||
|
|
||||||
|
checkout scm
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Building target ${target}") {
|
||||||
|
|
||||||
sh("rm -rf ${target_dir}")
|
sh("rm -rf ${target_dir}")
|
||||||
sh("mkdir -p ${target_dir}")
|
sh("mkdir -p ${target_dir}")
|
||||||
|
|
||||||
withDockerContainer(image: "jenkins-${target}") {
|
withDockerContainer(image: "jenkins-${target}") {
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
echo "UID=\$UID"
|
echo "UID=\$UID"
|
||||||
echo "GID=\$GID"
|
echo "GID=\$GID"
|
||||||
ls -al scripts/rpm-data/klayout.spec
|
ls -al scripts/rpm-data/klayout.spec
|
||||||
|
|
@ -40,37 +46,39 @@ cp ${work_dir}/RPMS/*/*.rpm ${target_dir}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
stage("Publish and test")
|
stage("Publish and test") {
|
||||||
|
|
||||||
parallel(
|
parallel(
|
||||||
"Publish": {
|
"Publish": {
|
||||||
|
|
||||||
// from shared library
|
// from shared library
|
||||||
publish(target)
|
publish(BRANCH_NAME, target, target_dir)
|
||||||
|
|
||||||
},
|
},
|
||||||
"Unit testing": {
|
"Unit testing": {
|
||||||
|
|
||||||
withDockerContainer(image: "jenkins-${target}") {
|
withDockerContainer(image: "jenkins-${target}") {
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
cd ${work_dir}/BUILD/build.linux-release
|
cd ${work_dir}/BUILD/build.linux-release
|
||||||
set +e
|
set +e
|
||||||
LD_LIBRARY_PATH=. TESTSRC=../../.. TESTTMP=testtmp xvfb-run ./ut_runner -c -a | tee ut_runner.xml
|
LD_LIBRARY_PATH=. TESTSRC=../../.. TESTTMP=testtmp xvfb-run ./ut_runner -c -a | tee ut_runner.xml
|
||||||
set -e
|
set -e
|
||||||
"""
|
"""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
junit(testResults: "${target}/BUILD/build.linux-release/ut_runner.xml")
|
junit(testResults: "${target}/BUILD/build.linux-release/ut_runner.xml")
|
||||||
|
|
||||||
},
|
},
|
||||||
"Installtest": {
|
"Installtest": {
|
||||||
|
|
||||||
withDockerContainer(image: "jenkins-${target}-basic") {
|
withDockerContainer(image: "jenkins-${target}-basic") {
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
cd ${target_dir}
|
cd ${target_dir}
|
||||||
|
|
||||||
echo \$USER
|
echo \$USER
|
||||||
|
|
@ -79,9 +87,11 @@ sudo yum -y install klayout-*.x86_64.rpm
|
||||||
klayout -b -h
|
klayout -b -h
|
||||||
"""
|
"""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue