Timeout build after 1 hour to prevent it hanging forever. (#1564)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 6 years ago committed by GitHub
parent 3e4953fd23
commit 1c6d6d6f6a
  1. 16
      Jenkinsfile

16
Jenkinsfile vendored

@ -49,6 +49,7 @@ if (env.BRANCH_NAME != "master") {
}
try {
timeout(time: 1, unit: 'HOURS') {
parallel UnitTests: {
def stage_name = "Unit tests node: "
node {
@ -167,7 +168,7 @@ try {
try {
sh 'pip install -r docs/requirements.txt'
sh 'mkdocs build -s'
} catch(e) {
} catch (e) {
throw e
}
}
@ -202,13 +203,13 @@ try {
shortCommit = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim()
version = sh(returnStdout: true, script: "grep -oE \"version=(.*)\" ${version_property_file} | cut -d= -f2").trim()
sh "docker image inspect \
--format='{{index .Config.Labels \"org.label-schema.vcs-ref\"}}' \
${image} \
| grep ${shortCommit}"
--format='{{index .Config.Labels \"org.label-schema.vcs-ref\"}}' \
${image} \
| grep ${shortCommit}"
sh "docker image inspect \
--format='{{index .Config.Labels \"org.label-schema.version\"}}' \
${image} \
| grep ${version}"
--format='{{index .Config.Labels \"org.label-schema.version\"}}' \
${image} \
| grep ${version}"
}
try {
stage(stage_name + 'Test image') {
@ -259,6 +260,7 @@ ${image} \
}
}
}
}
} catch (e) {
currentBuild.result = 'FAILURE'
} finally {

Loading…
Cancel
Save