File tree 1 file changed +11
-18
lines changed
1 file changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -142,22 +142,15 @@ curl --retry 5 -s "${TF_TESTLOG}" &> ${TMPFILE}
142
142
echo " TMPFILE=${TMPFILE} "
143
143
# probably rewrite, different hardcoded files, need to figure out how to export
144
144
145
- # download test coverage
146
- COVERAGE_URL=$( grep " e2e_coverage.txt report is available at" ${TMPFILE} | grep -E -o " https://.*\.txt" )
147
- echo " COVERAGE_URL=${COVERAGE_URL} "
148
- if [ -z " ${COVERAGE_URL} " ]; then
149
- echo " Could not parse e2e_coverage.txt URL at from test log ${TF_TESTLOG} "
150
- exit 5
151
- fi
152
- # download the file
153
- curl --retry 5 -L -O ${COVERAGE_URL}
154
- # download upstream test coverage
155
- COVERAGE_URL=$( grep " upstream_coverage.xml report is available at" ${TMPFILE} | grep -E -o " https://.*\.xml" )
156
- echo " COVERAGE_URL=${COVERAGE_URL} "
157
- if [ -z " ${COVERAGE_URL} " ]; then
158
- echo " Could not parse upstream_coverage.xml from test log ${TF_TESTLOG} "
159
- exit 5
160
- fi
161
- # download the file
162
- curl --retry 5 -L -O ${COVERAGE_URL}
145
+ for REPORT in e2e_coverage.txt upstream_coverage.xml; do
146
+ # download test coverage
147
+ COVERAGE_URL=$( grep " $REPORT report is available at" ${TMPFILE} | grep -E -o " https://[^[:space:]]*" )
148
+ echo " COVERAGE_URL=${COVERAGE_URL} "
149
+ if [ -z " ${COVERAGE_URL} " ]; then
150
+ echo " Could not parse $REPORT URL at from test log ${TF_TESTLOG} "
151
+ exit 5
152
+ fi
153
+ # download the file
154
+ curl --retry 5 -L -o " ${REPORT} " " ${COVERAGE_URL} "
155
+ done
163
156
rm ${TMPFILE}
You can’t perform that action at this time.
0 commit comments