Added 12h timeout to all pipelines
Change-Id: I085fcbda322d0877d5ffebd002fc109577788c29
diff --git a/build-extra-dpdk-pipeline.groovy b/build-extra-dpdk-pipeline.groovy
index 357a9ad..4d096ae 100644
--- a/build-extra-dpdk-pipeline.groovy
+++ b/build-extra-dpdk-pipeline.groovy
@@ -9,59 +9,60 @@
} catch (MissingPropertyException e) {
binaryPackages = ""
}
-
-node("docker") {
- try {
- def workspace = common.getWorkspace()
- stage("checkout") {
- sh("test -d debs && rm -rf debs || true")
- sh("test -d build && rm -rf build || true")
- git.checkoutGitRepository(
- ".",
- SOURCE_URL,
- SOURCE_BRANCH,
- SOURCE_CREDENTIALS,
- false,
- 30,
- 1
- )
- }
- stage("build") {
- if (binaryPackages == "all" || binaryPackages == "") {
- sh("docker run -v " + workspace + ":" + workspace + " -w " + workspace + " --rm=true --privileged "+OS+":" + DIST +
- " /bin/bash -c 'apt-get update && apt-get install -y packaging-dev && ./build-debs.sh " + DIST + "'")
- } else {
- sh("docker run -v " + workspace + ":" + workspace + " -w " + workspace + " --rm=true --privileged "+OS+":" + DIST +
- " /bin/bash -c 'apt-get update && apt-get install -y packaging-dev && ./build-debs.sh " + DIST + " " + binaryPackages + "'")
+timeout(time: 12, unit: 'HOURS') {
+ node("docker") {
+ try {
+ def workspace = common.getWorkspace()
+ stage("checkout") {
+ sh("test -d debs && rm -rf debs || true")
+ sh("test -d build && rm -rf build || true")
+ git.checkoutGitRepository(
+ ".",
+ SOURCE_URL,
+ SOURCE_BRANCH,
+ SOURCE_CREDENTIALS,
+ false,
+ 30,
+ 1
+ )
}
- archiveArtifacts artifacts: "debs/${DIST}-${ARCH}/*.deb"
- }
- lock("aptly-api") {
- stage("upload") {
- buildSteps = [:]
- debFiles = sh script: "ls debs/"+DIST+"-"+ARCH+"/*.deb", returnStdout: true
- for (file in debFiles.tokenize()) {
- def fh = new File((workspace+"/"+file).trim())
- buildSteps[fh.name.split('_')[0]] = aptly.uploadPackageStep(
- "debs/"+DIST+"-"+ARCH+"/"+fh.name,
- APTLY_URL,
- APTLY_REPO,
- true
- )
+ stage("build") {
+ if (binaryPackages == "all" || binaryPackages == "") {
+ sh("docker run -v " + workspace + ":" + workspace + " -w " + workspace + " --rm=true --privileged "+OS+":" + DIST +
+ " /bin/bash -c 'apt-get update && apt-get install -y packaging-dev && ./build-debs.sh " + DIST + "'")
+ } else {
+ sh("docker run -v " + workspace + ":" + workspace + " -w " + workspace + " --rm=true --privileged "+OS+":" + DIST +
+ " /bin/bash -c 'apt-get update && apt-get install -y packaging-dev && ./build-debs.sh " + DIST + " " + binaryPackages + "'")
}
- parallel buildSteps
+ archiveArtifacts artifacts: "debs/${DIST}-${ARCH}/*.deb"
}
- stage("publish") {
- aptly.snapshotRepo(APTLY_URL, APTLY_REPO, timestamp)
- aptly.publish(APTLY_URL)
+ lock("aptly-api") {
+ stage("upload") {
+ buildSteps = [:]
+ debFiles = sh script: "ls debs/"+DIST+"-"+ARCH+"/*.deb", returnStdout: true
+ for (file in debFiles.tokenize()) {
+ def fh = new File((workspace+"/"+file).trim())
+ buildSteps[fh.name.split('_')[0]] = aptly.uploadPackageStep(
+ "debs/"+DIST+"-"+ARCH+"/"+fh.name,
+ APTLY_URL,
+ APTLY_REPO,
+ true
+ )
+ }
+ parallel buildSteps
+ }
+ stage("publish") {
+ aptly.snapshotRepo(APTLY_URL, APTLY_REPO, timestamp)
+ aptly.publish(APTLY_URL)
+ }
+ }
+ } catch (Throwable e) {
+ // If there was an error or exception thrown, the build failed
+ currentBuild.result = "FAILURE"
+ currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
+ throw e
+ } finally {
+ common.sendNotification(currentBuild.result,"",["slack"])
}
- }
- } catch (Throwable e) {
- // If there was an error or exception thrown, the build failed
- currentBuild.result = "FAILURE"
- currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
- throw e
- } finally {
- common.sendNotification(currentBuild.result,"",["slack"])
- }
+ }
}