Commit c12ec99
authored
Enable linting (#732)
* Add Github Actions for running code linters
* Fix linting issues.
The super-linter.env currently has the following additions that are to be addressed in the future:
VALIDATE_GITHUB_ACTIONS=false
VALIDATE_SHELL_SHFMT=false
VALIDATE_YAML=false
Most of the linting for the above has been addressed with just a single issue remaining that blocks the linter from being enabled.
* Update GH workflow so linting always runs befor any other jobs
* Update GH workflow so linting always runs befor any other jobs
* Fix linting issues on the merge of origin/main
* Fix linting issues on the merge of origin/main
* Use the head ref for workflow concurrency
* Output the path filter result of the workflow
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Tweak github action used to detect changed paths on push/pull request
* Troubleshooting: ansible.builtin.user
* Troubleshooting: debugging temporarily added
* Shift pylint invalid-name linting behond python bang line
* Temporarily disable the ansible galaxy requirements validation
* Reverting changes made to ansible.builtin.user and ansible.builtin.group where the name parameter was added.
Reverting to ansible.builtin.group: <args>
becasue args aren't an expected label:
groupadd: '{'name': 'grafana', 'gid': 979}' is not a valid group name
* Arguments are dicts not labels
* Preserve file permissions on .ssh directory contents
* Wherever we use become_user set become: true, keeps the linter happy and maintains functionality
* Fix linting on merge of origin/main
* Fix linting on merge of origin/main
* Update cluster image - using fatimage built from ci/linting branch
* Add comments to workflow files detailing the CI workflow and enable these workflows
* Fix workflow execution:
1. change trivvy to trivy
2. extra, stackhpc, and trivyscan workflows should trigger on workflow_call and workflow_dispatch
* Fix linting issues from merge of origin/main
* Exclude 'ansible/roles/compute_init/files/compute-init.yml' from ansible lint.
The parser can't load the 'tasks/tuned.yml' ansible so fails with:
load-failure[filenotfounderror]: [Errno 2] No such file or directory: 'ansible-slurm-appliance/tasks/main.yml'
tasks/main.yml:1
This failure can't be skipped beause it's the output of the parser that's fed to the linter where such exceptions are made.
* Temporarily disable Rocky 8 to speed up testing and reduce CI resources
Temporarily disable ansible-lint:
Run ansible/ansible-lint@v25.4.0
Run if [[ -n "" ]]; then
Run action_ref="${GH_ACTION_REF_INPUT:-${GITHUB_ACTION_REF:-main}}"
Using ansible-lint ref: main
Run reqs_file=$(git rev-parse --show-toplevel)/.git/ansible-lint-requirements.txt
--2025-09-09 14:51:58-- https://raw.githubusercontent.com/ansible/ansible-lint/main/.config/requirements-lock.txt
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-09-09 14:51:58 ERROR 404: Not Found.
* Fix some bad ansible-lint line-length markup
* Fix ansible-lint markup for line-length
* Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
* Revert ansible.builtin.command to ansible.builtin.shell due to missed comment "need login shell for module command" and mask ansible-lint error
* Disable extra-build.yml workflow which has previously passed so we can focus on the stackhpc.yml workflow
* Disable concurrency to see if this is killing stackhpc.yml
* Remove concurrency from extr.yml, stackhpc.yml, and trivyscan.yml as they're all being triggered from main.yml which has its own concurrency check - the trivscan concurrency was also killing stackhpc
* Enable ansible-lint
* Enable triggering of all workflows from the main CI workflow
* Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
* Fix bad ansible-lint markup affecting the bang line
* Reduce workflow CI resources whilst fixing test deploy and reimage workflow
* Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
* Enable Rocky Linux 8 - disabled to speed up testing
* Enable all CI workflows
* Bump CI image - FOR RL9 ONLY TO CONSERVE CI RESOURCES
* Remove empty line between ansible "when" and "block" added by ansible-lint --fix, it's not required by the linter.
* Enable check for ansible galaxy requirements
* Revert the ansible collections path to ansible/collections so we don't inadvertently break any existing checkouts.
Direct ansible-lint to use .ansible/collections so downloads are excluded from linting by our .ansible-lint.yml
* Bump CI image1 parent 919a7e2 commit c12ec99
File tree
389 files changed
+5025
-4013
lines changed- .github
- bin
- linters
- workflows
- ansible
- adhoc
- ci
- library
- filter_plugins
- library
- roles
- alertmanager
- defaults
- handlers
- tasks
- basic_users
- defaults
- filter_plugins
- library
- tasks
- block_devices
- defaults
- library
- tasks
- cacerts
- defaults
- tasks
- cluster_infra
- defaults
- tasks
- compute_init
- files
- tasks
- cuda
- defaults
- tasks
- dnf_repos
- defaults
- tasks
- doca
- defaults
- tasks
- eessi
- defaults
- tasks
- etc_hosts
- defaults
- tasks
- fail2ban
- handlers
- meta
- tasks
- filebeat
- defaults
- handlers
- tasks
- firewalld
- defaults
- handlers
- meta
- tasks
- freeipa
- defaults
- tasks
- gateway
- files
- tasks
- grafana-dashboards
- files
- tasks
- hpctests
- defaults
- files
- library
- meta
- tasks
- templates
- k3s
- defaults
- tasks
- templates
- k9s/tasks
- lustre
- defaults
- tasks
- mysql
- defaults
- tasks
- nhc
- tasks
- ofed
- defaults
- tasks
- openondemand
- defaults
- files
- tasks
- opensearch
- defaults
- handlers
- tasks
- passwords
- defaults
- tasks
- persist_hostkeys
- defaults
- tasks
- persist_openhpc_secrets/tasks
- podman
- defaults
- tasks
- proxy
- defaults
- tasks
- pulp_site
- filter_plugins
- tasks
- rebuild
- defaults
- tasks
- resolv_conf
- defaults
- tasks
- slurm_exporter
- defaults
- handlers
- tasks
- slurm_recompile
- tasks
- slurm_stats
- tasks
- slurm_tools
- tasks
- squid
- defaults
- handlers
- tasks
- sshd
- defaults
- handlers
- tasks
- sssd
- defaults
- handlers
- tasks
- systemd
- defaults
- tasks
- topology
- defaults
- library
- tasks
- tuned
- defaults
- tasks
- zenith_proxy
- defaults
- files
- tasks
- cookiecutter
- {{cookiecutter.environment}}
- inventory/group_vars/all
- tofu
- dev
- docs
- experimental
- site
- environments
- .caas
- hooks
- inventory/group_vars
- all
- ui-meta
- .stackhpc
- hooks
- inventory/group_vars
- all
- tofu
- common
- files/filebeat
- inventory/group_vars/all
- site
- inventory/group_vars/all
- tofu
- node_group
- packer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
389 files changed
+5025
-4013
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments