Skip to content

Commit

Permalink
Add --strip-components option
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 committed Jun 21, 2023
1 parent 9475014 commit 7a8e6dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/reproduce_comparison/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,22 @@ 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
}
sh """
find . -type f -name '*.tar.gz' -delete
find . -type f -name '*.json' -delete
"""
}
}
}
Expand Down

0 comments on commit 7a8e6dd

Please sign in to comment.