jenkins: fix package publishing in main pipeline
Running the package tests in a container overwrote the built packages, because `withDockerEnv` checks out the git repo in the current directory. Package tests will be now run in a dedicated directory.
@@ -1081,12 +1081,16 @@ def buildPackage(stageName, image, repoName, repoPrefix, installImage,
def postCl = {
dir(targetDir) {
dockerUtils.buildImage(installImage)
+ // must not be run in targetDir because `withDockerEnv` checks out git
+ // repo in current directory which would overwrite build/package dir
+ dir("../packageTesting") {
// Do not call withDockerEnv(..) {} directly because this step would be
// executed in a nested node, causing the current node to wait for the
// stage on the other node to complete.
withDockerEnv.withDockerEnvWithoutNode(installImage) {
sh "kdb run_all || true" // TODO: remove `|| true` after specload and gopts tests are working
}
+ }
dir("build/package") {
publishPackagesFun(
'doc.libelektra.org',
