Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Output JUnit XML metadata for CircleCi
Fixes #11949
- Loading branch information
Showing
21 changed files
with
602 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
#!/bin/bash | ||
|
||
TEMPORARY_LOG_FILE="local_size_measurements-errors.log" | ||
|
||
. ./scripts/circleci/common.sh | ||
|
||
# Update the local size measurements to the master version | ||
# so that the size diff printed at the end of the build is | ||
# accurate. | ||
curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json | ||
process_curl "build" "$REPORT_FORMATTER" "$TEMPORARY_LOG_FILE" curl \ | ||
-sS -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json | ||
|
||
set -e | ||
|
||
yarn build --extract-errors | ||
|
||
# Note: since we run the full build including extracting error codes, | ||
# it is important that we *don't* reset the change to `scripts/error-codes/codes.json`. | ||
# When production bundle tests run later, it needs to be available. | ||
# See https://github.com/facebook/react/pull/11655. | ||
|
||
# Do a sanity check on bundles | ||
|
||
yarn lint-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
redirect_stderr() { | ||
REPORT_FORMATTER=$1 | ||
TEMPORARY_LOG_FILE=$2 | ||
|
||
if [ "$REPORT_FORMATTER" = "junit" ]; then | ||
"${@:3}" 2> "$TEMPORARY_LOG_FILE" | ||
else | ||
"${@:3}" | ||
fi | ||
} | ||
|
||
process_curl() { | ||
BUILD_STEP=$1 | ||
REPORT_FORMATTER=$2 | ||
TEMPORARY_LOG_FILE=$3 | ||
|
||
redirect_stderr "$REPORT_FORMATTER" "$TEMPORARY_LOG_FILE" "${@:4}" | ||
|
||
if [ "$REPORT_FORMATTER" = "junit" ]; then | ||
ERROR=$(cat "$TEMPORARY_LOG_FILE") | ||
if [ "$ERROR" != "" ];then | ||
echo $ERROR | ||
./scripts/circleci/write_junit_report.sh "$BUILD_STEP" "$ERROR" false | ||
fi | ||
rm -f $TEMPORARY_LOG_FILE | ||
if [ "$ERROR" != "" ];then | ||
exit 1 | ||
fi | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
node ./scripts/tasks/junit "$1" "$2" "$3" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.