Skip to content

Commit 820d67b

Browse files
authored
Add sanitize_results function to clean sensitive data
Added a function to sanitize results by removing sensitive domain information from files.
1 parent 2977cc0 commit 820d67b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/perf-lab/push-results.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ validate_inputs() {
3636
fi
3737
}
3838

39+
sanitize_results() {
40+
echo "Sanitizing results to remove sensitive domain information"
41+
42+
# Find all files in resultsDir and replace redhat.com and ibm.com patterns
43+
find ${resultsDir} -type f -exec sed -i \
44+
-e 's/[^[:space:]]*redhat\.com/*****/g' \
45+
-e 's/[^[:space:]]*ibm\.com/*****/g' \
46+
{} +
47+
}
48+
3949
push_results() {
4050
# Setup GH cli
4151
gh auth login --with-token <<< "${GITHUB_TOKEN}"
@@ -67,6 +77,9 @@ push_results() {
6777
cp -f ${resultsDir}/metrics.json ${jobResultsDir}/results-latest.json
6878
cp -f ${resultsDir}/metrics.json results/${jobName}-latest.json
6979

80+
# Sanitize the results
81+
sanitize_results
82+
7083
# Add things to git
7184
git config --local user.email quarkusio+quarkusbot@gmail.com
7285
git config --local user.name quarkusbot

0 commit comments

Comments
 (0)