Skip to content

Commit 6b347f4

Browse files
committed
linux: scrub signing logs
1 parent 569d10b commit 6b347f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/run_esrp_signing.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pprint
55
import subprocess
66
import sys
7+
import re
78

89
esrp_tool = os.path.join("esrp", "tools", "EsrpClient.exe")
910

@@ -96,8 +97,17 @@
9697
"-p", "policy.json",
9798
"-o", esrp_out,
9899
"-l", "Verbose"],
100+
capture_output=True,
101+
text=True,
99102
cwd=workspace)
100103

104+
# Scrub log before printing
105+
log = re.sub(r'^.+Uploading.*to\s*destinationUrl\s*(.+?),.+$',
106+
'***',
107+
result.stdout,
108+
flags=re.IGNORECASE|re.MULTILINE)
109+
printf(log)
110+
101111
if result.returncode != 0:
102112
print("Failed to run ESRPClient.exe")
103113
sys.exit(1)

0 commit comments

Comments
 (0)