Skip to content

Commit 17418f8

Browse files
authored
Add --strip-components option (#735)
Add --strip-components option Delete unnecessary files Signed-off-by: Sophia Guo <[email protected]>
1 parent 9475014 commit 17418f8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/reproduce_comparison/Jenkinsfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,24 @@ pipeline {
9797

9898
def originalJDKFile = findFiles(glob: "original/*.tar.gz")
9999
def reproducedJDKFile = findFiles(glob: "reproduced/*.tar.gz")
100-
def untarOriginalJDK = sh returnStatus: true, script: "tar xzf ${originalJDKFile[0].path} -C original"
100+
def untarOriginalJDK = sh returnStatus: true, script: "tar xzf ${originalJDKFile[0].path} --strip-components=1 -C original"
101101
if (untarOriginalJDK != 0 ) {
102102
currentBuild.result = 'UNSTABLE'
103103
error " Untar ${originalJDKFile[0].name} failed"
104104
return
105105
}
106-
def untarReproducedJDK = sh returnStatus: true, script: "tar xzf ${reproducedJDKFile[0].path} -C reproduced"
106+
def untarReproducedJDK = sh returnStatus: true, script: "tar xzf ${reproducedJDKFile[0].path} --strip-components=1 -C reproduced"
107107
if (untarReproducedJDK != 0 ) {
108108
currentBuild.result = 'UNSTABLE'
109109
error " Untar ${reproducedJDKFile[0].name} failed"
110110
return
111111
}
112+
113+
// Remove artifacts in untarred compared jdk dir before comparison
114+
sh """
115+
find . -type f -name '*.tar.gz' -delete
116+
find . -type f -name '*.json' -delete
117+
"""
112118
}
113119
}
114120
}

0 commit comments

Comments
 (0)