Skip to content

Commit

Permalink
Switch false-true in listArchives metadata call
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Sep 9, 2024
1 parent e9c9cc5 commit 265e8ae
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ class Build {
target: 'workspace/target/',
flatten: true)
// Check if JRE exists, if so, build another installer for it
if (listArchives(true).any { it =~ /-jre/ } ) { buildWindowsInstaller(versionData, '**/OpenJDK*jre_*_windows*.zip', 'jre') }
if (listArchives(false).any { it =~ /-jre/ } ) { buildWindowsInstaller(versionData, '**/OpenJDK*jre_*_windows*.zip', 'jre') }
break
default:
break
Expand Down Expand Up @@ -1056,13 +1056,13 @@ class Build {
/*
Lists and returns any compressed archived or sbom file contents of the top directory of the build node
*/
List<String> listArchives(Boolean forceShell) {
List<String> listArchives(Boolean allowBat) {
context.println "SXA: battable and batted 1060 - windbld#273"

def files
if ( forceShell ) { context.println("listArchives() invoked with forceShell = true") }
if ( !forceShell ) { context.println("listArchives() invoked with forceShell = false") }
if ( buildConfig.TARGET_OS == 'windows' && buildConfig.DOCKER_IMAGE && !forceShell ) {
if ( allowBat ) { context.println("listArchives() invoked with allowBat = true") }
if ( !allowBat ) { context.println("listArchives() invoked with allowBat = false") }
if ( buildConfig.TARGET_OS == 'windows' && buildConfig.DOCKER_IMAGE && allowBat ) {
// The grep here removes anything that still contains "*" because nothing matched
files = context.bat(
script: 'dir/b/s workspace\\target\\*.zip workspace\\target\\*.msi workspace\\target\\*.-sbom_* workspace\\target\\*.json',
Expand Down Expand Up @@ -1326,6 +1326,11 @@ class Build {

MetaData data = formMetadata(version, initialWrite)
Boolean metaWrittenOut = false
/*
* This is causing a problem when set to false. Sometimes it seems ok
* with the windows one, and sometimes not e.g.
* windbld#473/475/476/477
*/
listArchives(false).each({ file ->
def type = 'jdk'
if (file.contains('-jre')) {
Expand Down

0 comments on commit 265e8ae

Please sign in to comment.