Disable parallel builds; Retry build if copy fails
This commit is contained in:
parent
aec43dde0a
commit
3043d69d99
2 changed files with 29 additions and 7 deletions
12
compile/eclipsebuild/disableparallelbuilds.gsh
Normal file
12
compile/eclipsebuild/disableparallelbuilds.gsh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
// Disable parallel make builds - which may be causing autobuild issues
|
||||
def doDisableParallelMake(rootSearchFolder = "${WORKSPACE}") {
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
# Looks for "<builder*parallelBuildOn="true"* in all .cproject files and replaces the "true" with "false"
|
||||
find "${rootSearchFolder}" -iname ".cproject" | xargs -iXX sed -i "%s@\(<builder.*parallelBuildOn=\"\)true\(\"\)@\1false\2@g" XX
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
def doExport(exportfolder, exportpathlist, build_variant = "") {
|
||||
def result = 0
|
||||
for (exportpath in exportpathlist) {
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
|
|
@ -19,19 +20,28 @@ def doExport(exportfolder, exportpathlist, build_variant = "") {
|
|||
dir (env.destFolder) {
|
||||
echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\""
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
result = sh( script: """
|
||||
cp -r -v "${srcFileExpanded}" "${destFolder}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
"""
|
||||
""",
|
||||
returnStatus: true
|
||||
)
|
||||
if (result != 0) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
else {
|
||||
bat '''
|
||||
result = bat( script: '''
|
||||
copy \"%srcFileExpanded%\" \"%destFolder%\"
|
||||
if errorlevel 1 exit /b 1
|
||||
'''
|
||||
''',
|
||||
returnStatus: true
|
||||
)
|
||||
if (result != 0) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// Build and export files
|
||||
|
|
@ -58,8 +68,8 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
|||
"%DS5SHELL%" "%BUILD_COMMAND%" ${buildtype} "${project}\\${build_variant}"
|
||||
"""
|
||||
}
|
||||
doExport(exportfolder, exportpathlist, build_variant)
|
||||
}
|
||||
doExport(exportfolder, exportpathlist, build_variant)
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue