Skip to content

Commit

Permalink
Add --strip-components option (adoptium#735)
Browse files Browse the repository at this point in the history
Add --strip-components option
Delete unnecessary files

Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo authored and luhenry committed Feb 3, 2024
1 parent c9d8134 commit e352daf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/reproduce_comparison/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,24 @@ pipeline {

def originalJDKFile = findFiles(glob: "original/*.tar.gz")
def reproducedJDKFile = findFiles(glob: "reproduced/*.tar.gz")
def untarOriginalJDK = sh returnStatus: true, script: "tar xzf ${originalJDKFile[0].path} -C original"
def untarOriginalJDK = sh returnStatus: true, script: "tar xzf ${originalJDKFile[0].path} --strip-components=1 -C original"
if (untarOriginalJDK != 0 ) {
currentBuild.result = 'UNSTABLE'
error " Untar ${originalJDKFile[0].name} failed"
return
}
def untarReproducedJDK = sh returnStatus: true, script: "tar xzf ${reproducedJDKFile[0].path} -C reproduced"
def untarReproducedJDK = sh returnStatus: true, script: "tar xzf ${reproducedJDKFile[0].path} --strip-components=1 -C reproduced"
if (untarReproducedJDK != 0 ) {
currentBuild.result = 'UNSTABLE'
error " Untar ${reproducedJDKFile[0].name} failed"
return
}

// Remove artifacts in untarred compared jdk dir before comparison
sh """
find . -type f -name '*.tar.gz' -delete
find . -type f -name '*.json' -delete
"""
}
}
}
Expand Down

0 comments on commit e352daf

Please sign in to comment.