mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
The "eclair" script calls action_push.sh even for merge request, while instead action_pull_request.sh should be called, resulting in a job failure with this error: Unexpected event pull_request Fix the script to call action_pull_request.sh appropriately. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Reviewed-by: Simone Ballarin <simone.ballarin@bugseng.com>
37 lines
1.2 KiB
Bash
Executable File
37 lines
1.2 KiB
Bash
Executable File
#!/bin/sh -eu
|
|
|
|
ECLAIR_ANALYSIS_DIR=automation/eclair_analysis
|
|
ECLAIR_DIR="${ECLAIR_ANALYSIS_DIR}/ECLAIR"
|
|
ECLAIR_OUTPUT_DIR=$(realpath "${ECLAIR_OUTPUT_DIR}")
|
|
|
|
"${ECLAIR_ANALYSIS_DIR}/prepare.sh" "${VARIANT}"
|
|
|
|
ex=0
|
|
"${ECLAIR_DIR}/analyze.sh" "${VARIANT}" "${RULESET}" || ex=$?
|
|
"${ECLAIR_DIR}/action_log.sh" ANALYSIS_LOG \
|
|
"ECLAIR analysis log" \
|
|
"${ECLAIR_OUTPUT_DIR}/ANALYSIS.log" \
|
|
"${ex}"
|
|
"${ECLAIR_DIR}/action_log.sh" REPORT_LOG \
|
|
"ECLAIR report log" \
|
|
"${ECLAIR_OUTPUT_DIR}/REPORT.log" \
|
|
"${ex}"
|
|
[ "${ex}" = 0 ] || exit "${ex}"
|
|
|
|
# Fail in case of new reports for clean guidelines
|
|
"${ECLAIR_DIR}/action_check_clean_regressions.sh" "${ECLAIR_OUTPUT_DIR}" || ex=$?
|
|
|
|
case "${CI_PIPELINE_SOURCE}" in
|
|
merge_request_event)
|
|
"${ECLAIR_DIR}/action_pull_request.sh" "${WTOKEN}" "${ECLAIR_OUTPUT_DIR}"
|
|
;;
|
|
push | pipeline | web | schedule)
|
|
"${ECLAIR_DIR}/action_push.sh" "${WTOKEN}" "${ECLAIR_OUTPUT_DIR}"
|
|
;;
|
|
*)
|
|
echo "Unexpected event ${CI_PIPELINE_SOURCE}" >&2
|
|
ex=1
|
|
;;
|
|
esac
|
|
[ "${ex}" = 0 ] || exit "${ex}"
|