2021-10-30 18:45:44 +02:00
|
|
|
|
|
|
|
|
@Library("platform") _
|
|
|
|
|
|
|
|
|
|
properties([disableConcurrentBuilds()])
|
|
|
|
|
|
|
|
|
|
// from shared library - uses tags to set the platform name
|
|
|
|
|
// (this is a pretty stupid way to set a parameter, but I don't
|
|
|
|
|
// know of a better way to parameterize a multibranch pipeline)
|
|
|
|
|
platform = pypi_platform()
|
|
|
|
|
py_version = pypi_py_version()
|
|
|
|
|
|
|
|
|
|
currentBuild.description = "PyPI deployment " + platform
|
|
|
|
|
|
|
|
|
|
docker_image = "jenkins-manylinux2014_x86_64-pypi"
|
|
|
|
|
target = platform + ".whl"
|
|
|
|
|
|
|
|
|
|
node("master") {
|
|
|
|
|
|
|
|
|
|
stage("Checkout sources") {
|
|
|
|
|
checkout scm
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage("Building target ${target}") {
|
|
|
|
|
|
|
|
|
|
sh("rm -rf wheelhouse ; mkdir -p wheelhouse")
|
|
|
|
|
|
|
|
|
|
withDockerContainer(image: docker_image, args: "-v " + pwd() + ":/io") {
|
|
|
|
|
sh("PY_VERSION=" + py_version + " /io/ci-scripts/docker/docker_build_jenkins.sh")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stage("Publish and test") {
|
|
|
|
|
|
|
|
|
|
// publish for release tags
|
2022-01-06 09:38:13 +01:00
|
|
|
if (BRANCH_NAME.startsWith('pypi_v')) {
|
2021-10-30 18:45:44 +02:00
|
|
|
sh("twine upload --skip-existing wheelhouse/klayout-*manylinux2014*.whl wheelhouse/*.zip")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|