From 423e88d3221238b488c2c1b9eeaa6bfe77d4f383 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:22:13 +0100 Subject: [PATCH 01/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 52 +++++++++++++++--------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 30fe4d5..e17f4b9 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,7 +1,34 @@ + +def doExport(exportpathlist, build_variant = "") { + for (exportpath in exportpathlist) { + echo "Export path at: ${exportpath}" + script { + if (build_variant) { + env.destFolder = "${exportfolder}/${build_variant}/${project}" + env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + } + else { + env.destFolder = "${exportfolder}/${project}" + env.srcFileExpanded = "${WORKSPACE}/${exportpath}" + } + } + dir (env.destFolder) { + echo "Copy ${srcFileExpanded} to ${destFolder}" + if (isUnix()) { + sh 'cp \"${srcFileExpanded}\" ${destFolder}' + } + else { + bat 'copy \"%srcFileExpanded%\" %destFolder%' + } + } + } +} + // Build and export files def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, project, variants, exportpath) = appInfo + (build, project, variants, exportpathlist) = appInfo if (build) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) @@ -15,27 +42,12 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { """ } } - if (exportpath) { - echo "Export path at: ${exportpath}" - script { - env.destFolder = "${exportfolder}/${build_variant}/${project}" - env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") - } - dir (env.destFolder) { - if (exportpath) { - echo "Copy ${srcFileExpanded} to ${destFolder}" - if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' - } - else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' - } - } - } - } + doExport(exportpathlist, build_variant) } } + else { + doExport(exportpathlist, build_variant) + } } } From a34f8ee1e896397e4e1eb7a7ca5331c07b748878 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:34:48 +0100 Subject: [PATCH 02/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index e17f4b9..065e64a 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -34,8 +34,8 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - } + sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + } else { bat """ "%BUILD_COMMAND%" -build "${project}\\${build_variant}" @@ -46,7 +46,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } else { - doExport(exportpathlist, build_variant) + doExport(exportpathlist) } } } From 07a0a49d06993d2423a87e5c9bbef438e1cce3ff Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:47:21 +0100 Subject: [PATCH 03/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 065e64a..f0700b4 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,5 +1,5 @@ -def doExport(exportpathlist, build_variant = "") { +def doExport(exportfolder, exportpathlist, build_variant = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" script { @@ -42,11 +42,11 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { """ } } - doExport(exportpathlist, build_variant) + doExport(exportfolder, exportpathlist, build_variant) } } else { - doExport(exportpathlist) + doExport(exportfolder, exportpathlist) } } } From 783c61598d02d01722eb6f50812693a6b4683431 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:06:33 +0100 Subject: [PATCH 04/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index f0700b4..ca4fd2c 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,7 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' + sh 'cp -v \"${srcFileExpanded}\" ${destFolder}' } else { bat 'copy \"%srcFileExpanded%\" %destFolder%' From e77d9f03a1da9ae10211c8120f1947e916413e73 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:26:27 +0100 Subject: [PATCH 05/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index ca4fd2c..0801386 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,10 +16,13 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp -v \"${srcFileExpanded}\" ${destFolder}' + sh """ + echo cp -v -\"${srcFileExpanded}\"- -\"${destFolder}\"- + cp -v \"${srcFileExpanded}\" \"${destFolder}\" + """ } else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' + bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' } } } From c937856bfd2d3a5ca3258ecf43717d522315e247 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:43:32 +0100 Subject: [PATCH 06/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 0801386..357e64a 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,10 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh """ - echo cp -v -\"${srcFileExpanded}\"- -\"${destFolder}\"- - cp -v \"${srcFileExpanded}\" \"${destFolder}\" - """ + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 142e5955443a97e25d2410689e0f9356a76219b0 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:55:28 +0100 Subject: [PATCH 07/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 357e64a..477d68d 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,7 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\" + sh 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 8c63eee9697553883202fb26e1cc9ef97a4ff469 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:22:08 +0100 Subject: [PATCH 08/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 477d68d..fc8ecd0 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -14,9 +14,9 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } } dir (env.destFolder) { - echo "Copy ${srcFileExpanded} to ${destFolder}" + echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - sh 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' + bash 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 585ddabcf5570d1f1c7133d74fce7524596283e4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:25:12 +0100 Subject: [PATCH 09/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index fc8ecd0..b91e487 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -14,9 +14,11 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } } dir (env.destFolder) { + echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - bash 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' + echo "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From ec69c45d90ce01745dd5c828e0292471f0f4054b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:50:08 +0100 Subject: [PATCH 10/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index b91e487..9544faf 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -15,10 +15,8 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } dir (env.destFolder) { echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' - echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - echo "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" - sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" + sh "cp -v ${srcFileExpanded} \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 20a392db61328799b2357b2b38dff56ed95566b8 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 18:30:39 +0100 Subject: [PATCH 11/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 9544faf..5b113d3 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -3,20 +3,23 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" script { + echo "Build variant is ${build_variant}" if (build_variant) { + echo "Build variant is ${build_variant}" env.destFolder = "${exportfolder}/${build_variant}/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } else { + echo "No build variant" env.destFolder = "${exportfolder}/${project}" env.srcFileExpanded = "${WORKSPACE}/${exportpath}" } } dir (env.destFolder) { - echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' + echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - sh "cp -v ${srcFileExpanded} \"${destFolder}\"" + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 93443e340ddb102379ccb8dc25168d6f3a8e7bc9 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 18:56:17 +0100 Subject: [PATCH 12/13] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 5b113d3..d9b2a92 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -49,7 +49,10 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } else { - doExport(exportfolder, exportpathlist) + // Only export if the project has no variants - signifying that there are files to export which have been prebuilt + if (!variants) { + doExport(exportfolder, exportpathlist) + } } } } From 305ae709aacbf8cf203263211ac376f8eea2114f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 25 Jun 2018 13:50:09 +0100 Subject: [PATCH 13/13] HMBXR5601-233 - Extend checkout timeout to 2 hours --- versioncontrol/git.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 70fe6bc..9d96232 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -26,7 +26,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], - [$class: 'CheckoutOption', timeout: 60], + [$class: 'CheckoutOption', timeout: 120], [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir] ], submoduleCfg: [],