This repository was archived by the owner on May 25, 2026. It is now read-only.
rev32
* DPE-1116 Add shellcheck GH Action
* Fix shellcheck warnings/errors for destroy_chaos_mesh.sh and deploy_chaos_mesh.sh
* Fix spaces VS tabulations
I prefer to use spaces in shell scripts,
but let's use the current tabulations here for now.
* Use static commit for 3rd party action
The code in commit 6d3f514f has been manually validated
and contains no risky parts. The only potentially dangerous command
is curling and executing shellcheck binary from another (official) repo:
> baseurl="https://github.com/koalaman/shellcheck/releases/download"
> curl -Lso "${{ github.action_path }}/sc.tar.xz" \
> "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz"
Since it is a read-only static code analyse on dedicated GH runner,
no harm can be produced by compromised shellcheck binary.
* Fix 0341c6d: read->readarray in destroy_chaos_mesh.sh
Nice catch @delgod!
* Use full commit id for action-shellcheck
Otherwise GH is not happy:
> Error: Unable to resolve action `ludeeus/action-shellcheck@6d3f514f`,
> the provided ref `6d3f514f` is the shortened version of a commit SHA, which is not supported.
> Please use the full commit SHA `6d3f514f44620b9d4488e380339edc0d9bbe2fba` instead.
* Add tox.ini for shellcheck
* Use 'tox -e shellcheck' in CI/CD instead of 3rd party GH action
* Fix tox error to allow bash
> tox -e shellcheck
> shellcheck: commands[0]> /bin/bash -c 'shellcheck --color=always $(git ls-files "*.bash" "*.sh")'
> shellcheck: failed with /bin/bash (resolves to /bin/bash) is not allowed, use allowlist_externals to allow it
> shellcheck: FAIL code 1 (0.02 seconds)
> evaluation failed :( (0.05 seconds)
* Fix shellcheck warning 'SC2016 Expressions don't expand in single quotes'
In tests/integration/high_availability/scripts/destroy_chaos_mesh.sh line 48:
> if [ -n "$chaos_mesh_ns" ] && sg microk8s -c 'microk8s.helm3 repo list --namespace=$chaos_mesh_ns' | grep -q 'chaos-mesh'; then
^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
* Fix GH CI/CD to install tox before calling it
* Move GH actions/checkout@v2 to the latest version 3
* Put shellcheck into 'lint' test scope