Timeout builds

This commit is contained in:
Dan Hawkins 2018-09-17 22:40:33 +01:00
commit 3d5af70b41

View file

@ -51,6 +51,7 @@ def doExport(exportfolder, exportpathlist, project = "", build_variant = "") {
if (isUnix()) {
result = sh( script: """
cp -r -v "${srcFileExpanded}" "${destFolder}"
if [ \$? -ne 0 ]; then exit 1; fi
""",
returnStatus: true
)
@ -61,6 +62,7 @@ def doExport(exportfolder, exportpathlist, project = "", build_variant = "") {
else {
result = bat( script: '''
copy \"%srcFileExpanded%\" \"%destFolder%\"
if errorlevel 1 EXIT /b 1
''',
returnStatus: true
)
@ -136,14 +138,14 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou
doRegisterToolchain(ds5folder, toolchainfolder)
echo "Build command: ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\'"
if (isUnix()) {
timeout(time: 5, unit: MINUTES) {
timeout(time: 5, unit: 'MINUTES') {
sh """
echo Start time: `date`
${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\'
echo End time: `date`
"""
}
sleep(time: 4, unit: SECONDS)
sleep(time: 4, unit: 'SECONDS')
}
else {
bat """