Skip to content

Commit 37a0072

Browse files
authored
Enable yamllint + key ordering + refresh super-linter (#874)
* enable yamllint + key ordering key-ordering: ignore every file except dnf_repo_timestamps.yml * yamllint: disable line-length for the moment * make super-linter use the .yamllint.yml * fix harmless yamllint warning 'on' is truthy value * fix harmless yamllint warning about whitespaces * fix harmless yamllint warning True for env var * fix harmless yamllint warning missing eol at eof * yamllint: ignore filebeat.yml: jinja syntax * Bump super-linter 8.3.2 Disable BIOME linter * Disable zizmor linter for now It should be re-enabled later * Markdown: remove empty line before lists * Fix case for common terms (textlint) * fix pylint and flake8 issues * Markdown: ignore more rules * fix black linting warnings * Disable trivy for now
1 parent 74e21ba commit 37a0072

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+212
-172
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
# Default state for all rules
3+
default: true
4+
5+
# MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md059.md
6+
# we often use [here](https://...)
7+
MD059: false
8+
9+
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
10+
# we wrote without this rule, so don't reformat just for the sake of it now.
11+
MD013:
12+
line_length: 524
13+
14+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md024.md
15+
MD024:
16+
# Only check sibling headings
17+
siblings_only: true
18+
19+
# MD029/ol-prefix
20+
# the linter gets confused by blocks of code
21+
MD029: false
22+
23+
# MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines
24+
# doesn't matter to github renderer
25+
MD031: false
26+
27+
# MD036/no-emphasis-as-heading Emphasis used instead of a heading
28+
MD036: false

.github/workflows/extra.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# See the workflow file 'main.yml' for how this is CI triggered.
66

77
name: Test extra build
8-
on:
8+
'on':
99
workflow_call:
1010
workflow_dispatch:
1111

@@ -25,14 +25,14 @@ jobs:
2525
build:
2626
- image_name: openhpc-extra-RL8
2727
source_image_name_key: RL8 # key into environments/.stackhpc/tofu/cluster_image.auto.tfvars.json
28-
inventory_groups: doca,cuda # lustre disabled due to https://github.com/stackhpc/ansible-slurm-appliance/pull/759
28+
inventory_groups: doca,cuda # lustre disabled due to https://github.com/stackhpc/ansible-slurm-appliance/pull/759
2929
volume_size: 35 # needed for cuda
3030
- image_name: openhpc-extra-RL9
3131
source_image_name_key: RL9
3232
inventory_groups: doca,cuda,lustre
3333
volume_size: 35 # needed for cuda
3434
env:
35-
ANSIBLE_FORCE_COLOR: True
35+
ANSIBLE_FORCE_COLOR: 'true'
3636
OS_CLOUD: openstack
3737
CI_CLOUD: ${{ vars.CI_CLOUD }} # default from repo settings
3838
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}

.github/workflows/fatimage.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Build fat image
2-
on:
2+
'on':
33
workflow_dispatch:
4-
# checkov:skip=CKV_GHA_7: "The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty. "
5-
inputs:
6-
ci_cloud:
7-
description: 'Select the CI_CLOUD'
8-
required: true
9-
type: choice
10-
options:
11-
- default
12-
- LEAFCLOUD
13-
- SMS
14-
- ARCUS
15-
default: default # Use repo CI_CLOUD setting
16-
cleanup_on_failure:
17-
description: Cleanup Packer resources on failure
18-
type: boolean
19-
required: true
20-
default: true
4+
# checkov:skip=CKV_GHA_7: "The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty. "
5+
inputs:
6+
ci_cloud:
7+
description: 'Select the CI_CLOUD'
8+
required: true
9+
type: choice
10+
options:
11+
- default
12+
- LEAFCLOUD
13+
- SMS
14+
- ARCUS
15+
default: default # Use repo CI_CLOUD setting
16+
cleanup_on_failure:
17+
description: Cleanup Packer resources on failure
18+
type: boolean
19+
required: true
20+
default: true
2121

2222
permissions:
2323
contents: read
@@ -43,7 +43,7 @@ jobs:
4343
source_image_name: Rocky-9-GenericCloud-Base-9.7-20251123.2.x86_64.qcow2
4444
inventory_groups: fatimage
4545
env:
46-
ANSIBLE_FORCE_COLOR: True
46+
ANSIBLE_FORCE_COLOR: 'true'
4747
OS_CLOUD: openstack
4848
CI_CLOUD: ${{ github.event.inputs.ci_cloud == 'default' && vars.CI_CLOUD || github.event.inputs.ci_cloud }}
4949
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Lint
33

4-
on: # yamllint disable-line rule:truthy
4+
'on':
55
workflow_call:
66

77
permissions:
@@ -43,7 +43,7 @@ jobs:
4343
if: always()
4444

4545
- name: Run super-linter
46-
uses: super-linter/super-linter@v7.3.0
46+
uses: super-linter/super-linter@v8.3.2
4747
if: always()
4848
env:
4949
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ permissions:
2222
# upload trivy scan results
2323
security-events: write
2424

25-
on:
25+
'on':
2626
push:
2727
branches:
2828
- main
2929
pull_request:
3030

3131
concurrency:
32-
group: ${{ github.workflow }}-${{ github.head_ref }}
33-
cancel-in-progress: true
32+
group: ${{ github.workflow }}-${{ github.head_ref }}
33+
cancel-in-progress: true
3434

3535
jobs:
3636
lint:
@@ -43,18 +43,18 @@ jobs:
4343
runs-on: ubuntu-24.04
4444
# Map a step output to a job output, this allows other jobs to be gated on the filter results
4545
outputs:
46-
# The 'stackhpc' output will be 'true' if either of the two stackhpc filters below matched
47-
stackhpc: ${{ toJson(fromJson(steps.filter_on_every.outputs.stackhpc) || fromJson(steps.filter_on_some.outputs.stackhpc)) }}
48-
extra_on_push: ${{ steps.filter_on_some.outputs.extra_on_push }}
49-
extra_on_pull_request: ${{ steps.filter_on_some.outputs.extra_on_pull_request }}
50-
trivyscan: ${{ steps.filter_on_some.outputs.trivyscan }}
46+
# The 'stackhpc' output will be 'true' if either of the two stackhpc filters below matched
47+
stackhpc: ${{ toJson(fromJson(steps.filter_on_every.outputs.stackhpc) || fromJson(steps.filter_on_some.outputs.stackhpc)) }}
48+
extra_on_push: ${{ steps.filter_on_some.outputs.extra_on_push }}
49+
extra_on_pull_request: ${{ steps.filter_on_some.outputs.extra_on_pull_request }}
50+
trivyscan: ${{ steps.filter_on_some.outputs.trivyscan }}
5151
steps:
5252
- name: Checkout
5353
uses: actions/checkout@v4
5454

5555
# NOTE: We're detecting the changed files within a job so that we can gate execution of other jobs.
5656
# We use dorny/paths-filter which doesn't work like the conventional 'paths' and 'paths_exclude',
57-
# we can't do the following:
57+
# we can't do the following:
5858
# paths:
5959
# - '**'
6060
# - '!dev/**'

.github/workflows/nightly-cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Cleanup CI clusters
2-
on:
2+
'on':
33
workflow_dispatch:
44
schedule:
55
- cron: '0 21 * * *' # Run at 9PM - image sync runs at midnight

.github/workflows/nightlybuild.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Build nightly image
2-
on:
2+
'on':
33
workflow_dispatch:
4-
# checkov:skip=CKV_GHA_7: "The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty. "
5-
inputs:
6-
ci_cloud:
7-
description: 'Select the CI_CLOUD'
8-
required: true
9-
type: choice
10-
options:
11-
- LEAFCLOUD
12-
- SMS
13-
- ARCUS
4+
# checkov:skip=CKV_GHA_7: "The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty. "
5+
inputs:
6+
ci_cloud:
7+
description: 'Select the CI_CLOUD'
8+
required: true
9+
type: choice
10+
options:
11+
- LEAFCLOUD
12+
- SMS
13+
- ARCUS
1414
# schedule:
1515
# - cron: '0 0 * * *' # Run at midnight on default branch
1616

@@ -38,7 +38,7 @@ jobs:
3838
source_image_name: Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
3939
inventory_groups: update
4040
env:
41-
ANSIBLE_FORCE_COLOR: True
41+
ANSIBLE_FORCE_COLOR: 'true'
4242
OS_CLOUD: openstack
4343
CI_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }}
4444
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}

.github/workflows/release-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Release images
2-
on:
2+
'on':
33
workflow_dispatch:
44
release:
55
types:
@@ -34,11 +34,11 @@ jobs:
3434
run: |
3535
sudo apt-get update
3636
sudo apt-get --yes install s3cmd
37-
37+
3838
- name: Retrieve image name
3939
run: |
4040
TARGET_IMAGE=$(jq --arg version "${{ matrix.build }}" -r '.cluster_image[$version]' "${{ env.IMAGE_PATH }}")
4141
echo "TARGET_IMAGE=${TARGET_IMAGE}" >> "$GITHUB_ENV"
42-
42+
4343
- name: Copy image from pre-release to release bucket
4444
run: s3cmd cp s3://openhpc-images-prerelease/${{ env.TARGET_IMAGE }} s3://openhpc-images

.github/workflows/s3-image-sync.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Upload CI-tested images to Leafcloud S3 and sync clouds
2-
on:
2+
'on':
33
workflow_dispatch:
44
push:
55
branches:
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
sudo apt-get update
3737
sudo apt-get --yes install s3cmd
38-
38+
3939
- name: Cleanup S3 bucket
4040
run: |
4141
s3cmd rm s3://${{ env.S3_BUCKET }} --recursive --force
@@ -51,7 +51,7 @@ jobs:
5151
- RL8
5252
- RL9
5353
env:
54-
ANSIBLE_FORCE_COLOR: True
54+
ANSIBLE_FORCE_COLOR: 'true'
5555
OS_CLOUD: openstack
5656
CI_CLOUD: ${{ vars.CI_CLOUD }}
5757
outputs:
@@ -130,11 +130,11 @@ jobs:
130130
build:
131131
- RL8
132132
- RL9
133-
exclude:
133+
exclude:
134134
- cloud: ${{ needs.image_upload.outputs.ci_cloud }}
135135

136136
env:
137-
ANSIBLE_FORCE_COLOR: True
137+
ANSIBLE_FORCE_COLOR: 'true'
138138
OS_CLOUD: openstack
139139
CI_CLOUD: ${{ matrix.cloud }}
140140
steps:

.github/workflows/stackhpc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# See the workflow file 'main.yml' for how this is CI triggered.
66

77
name: Test deployment and reimage on OpenStack
8-
on:
8+
'on':
99
workflow_call:
1010
workflow_dispatch:
1111

@@ -26,7 +26,7 @@ jobs:
2626
- RL8
2727
- RL9
2828
env:
29-
ANSIBLE_FORCE_COLOR: True
29+
ANSIBLE_FORCE_COLOR: 'true'
3030
OS_CLOUD: openstack
3131
TF_VAR_cluster_name: slurmci-${{ matrix.os_version }}-${{ github.run_number }}
3232
CI_CLOUD: ${{ vars.CI_CLOUD }} # default from repo settings
@@ -37,7 +37,7 @@ jobs:
3737
- name: Find the latest release
3838
run: |
3939
echo "LATEST_RELEASE_TAG=$(curl -s https://api.github.com/repos/stackhpc/ansible-slurm-appliance/releases/latest | jq -r .tag_name)" >> "$GITHUB_ENV"
40-
40+
4141
- name: Checkout latest release
4242
uses: actions/checkout@v4
4343
with:
@@ -82,7 +82,7 @@ jobs:
8282
- name: Install ansible, pip and galaxy requirements
8383
run: dev/setup-env.sh
8484
env:
85-
PYTHON_VERSION: python3 # overrides os-release discovery logic
85+
PYTHON_VERSION: python3 # overrides os-release discovery logic
8686

8787
- name: Install OpenTofu
8888
uses: opentofu/[email protected]
@@ -175,7 +175,7 @@ jobs:
175175
cd "$STACKHPC_TF_DIR"
176176
tofu init
177177
tofu apply -auto-approve -var-file="${{ env.CI_CLOUD }}.tfvars"
178-
178+
179179
- name: Configure cluster using current branch
180180
run: |
181181
. venv/bin/activate
@@ -245,7 +245,7 @@ jobs:
245245
- name: Delete possible volume snapshot from slurm upgrade
246246
run: |
247247
. venv/bin/activate
248-
. environments/.stackhpc/activate
248+
. environments/.stackhpc/activate
249249
if [ -n "$SNAPSHOT" ]
250250
then
251251
echo "Deleting $SNAPSHOT"

0 commit comments

Comments
 (0)