Fail build if a copy fails

This commit is contained in:
Dan Hawkins 2018-10-11 20:48:16 +01:00
commit df638458de

View file

@ -154,7 +154,10 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou
"""
}
}
doExport(exportfolder, exportpathlist, "", build_variant)
result = doExport(exportfolder, exportpathlist, "", build_variant)
if (result != 0) {
error "Failed to copy...."
}
} catch (Exception e) {
echo "Build failed - Waiting for a while"
sleep(time: 4, unit: 'SECONDS')
@ -166,7 +169,10 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou
else {
// Only export if the project has no variants - signifying that there are files to export which have been prebuilt
if (!variants) {
doExport(exportfolder, exportpathlist, project)
result = doExport(exportfolder, exportpathlist, project)
if (result != 0) {
error "Failed to copy...."
}
}
}
}