diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04c944c9b4a5..d53cf9bb91e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: integration-suites: ${{ steps.integration-suites.outputs.suites }} needs-basic-check: ${{ steps.categorize-basic-checks.outputs.needs-basic-check }} basic-checks: ${{ steps.categorize-basic-checks.outputs.basic-checks }} - needs-build: ${{ steps.selective-checks.outputs.needs-build }} + needs-build: ${{ steps.selective-checks.outputs.needs-build || steps.selective-checks.outputs.needs-integration-tests }} needs-compile: ${{ steps.selective-checks.outputs.needs-compile }} needs-compose-tests: ${{ steps.selective-checks.outputs.needs-compose-tests }} needs-integration-tests: ${{ steps.selective-checks.outputs.needs-integration-tests }} diff --git a/hadoop-ozone/dev-support/checks/_post_process.sh b/hadoop-ozone/dev-support/checks/_post_process.sh index 7501050f34f8..b455117d04c0 100644 --- a/hadoop-ozone/dev-support/checks/_post_process.sh +++ b/hadoop-ozone/dev-support/checks/_post_process.sh @@ -26,10 +26,18 @@ # - $REPORT_FILE should be defined # - Maven output should be saved in $REPORT_DIR/output.log +if [[ ! -d "${REPORT_DIR}" ]]; then + mkdir -p "${REPORT_DIR}" +fi + if [[ ! -s "${REPORT_FILE}" ]]; then # check if there are errors in the log if [[ -n "${ERROR_PATTERN:-}" ]]; then - grep -m25 "${ERROR_PATTERN}" "${REPORT_DIR}/output.log" > "${REPORT_FILE}" + if [[ -e "${REPORT_DIR}/output.log" ]]; then + grep -m25 "${ERROR_PATTERN}" "${REPORT_DIR}/output.log" > "${REPORT_FILE}" + else + echo "Unknown failure, output.log missing" > "${REPORT_FILE}" + fi fi # script failed, but report file is empty (does not reflect failure) if [[ ${rc} -ne 0 ]] && [[ ! -s "${REPORT_FILE}" ]]; then diff --git a/hadoop-ozone/dev-support/checks/junit.sh b/hadoop-ozone/dev-support/checks/junit.sh index ce93510f1f3e..3e6538b506c8 100755 --- a/hadoop-ozone/dev-support/checks/junit.sh +++ b/hadoop-ozone/dev-support/checks/junit.sh @@ -68,7 +68,7 @@ for i in $(seq 1 ${ITERATIONS}); do mkdir -p "${REPORT_DIR}" fi - mvn ${MAVEN_OPTIONS} -Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" clean verify \ + mvn ${MAVEN_OPTIONS} -Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" verify \ | tee "${REPORT_DIR}/output.log" irc=$? @@ -107,5 +107,5 @@ if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then mvn -B -N jacoco:merge -Djacoco.destFile=$REPORT_DIR/jacoco-combined.exec -Dscan=false fi -ERROR_PATTERN="BUILD FAILURE" +ERROR_PATTERN="\[ERROR\]" source "${DIR}/_post_process.sh" diff --git a/hadoop-ozone/dev-support/checks/rat.sh b/hadoop-ozone/dev-support/checks/rat.sh index 3582587f8da4..1a9932e1e157 100755 --- a/hadoop-ozone/dev-support/checks/rat.sh +++ b/hadoop-ozone/dev-support/checks/rat.sh @@ -24,7 +24,8 @@ mkdir -p "$REPORT_DIR" REPORT_FILE="$REPORT_DIR/summary.txt" -mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:check "$@" +mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:check "$@" \ + | tee "${REPORT_DIR}/output.log" grep -r --include=rat.txt "!????" $dirs | tee "$REPORT_FILE"