Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the script in ecosystem-cert-preflight-checks
The ecosystem-cert-preflight-checks Task started reporting failure in the `TEST_OUTPUT` result for checks that fully passed. This is due to the incorrect declaration of the `SUPPORTED_ARCHES` array leading to the path to the `results.json` file containing the comma `,`, e.g. `artifacts/arm64,/results.json`. In addition to this there are several other issues with the embedded script in the Task: * Error handling is not turned on * Variables are not quoted (see https://www.shellcheck.net/wiki/SC2086) * Unnecessary `cat | jq` usage, jq can read the file directly * Use of `expr` when `$((...))` expression can be used (see https://www.shellcheck.net/wiki/SC2003) * Use of `>` for number comparison (see https://www.shellcheck.net/wiki/SC2071) * Incorrect logic in the forming of the note text, if the first encountered result has passed and any of the subsequent results has failed, the note would include `SUCCESS` instead of `FAILURE`; also if any errors were encountered this would not modify the note text
- Loading branch information