Skip to content

Commit 4b67132

Browse files
authored
fix: update common, clean out dead code and get linting working (#52)
Signed-off-by: Chris Butler <[email protected]>
1 parent a902547 commit 4b67132

Some content is hidden

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

51 files changed

+205
-1061
lines changed

.ansible-lint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Vim filetype=yaml
22
---
33
offline: false
4-
#requirements: ansible/execution_environment/requirements.yml
54

65
exclude_paths:
76
- .cache/
87
- .github/
98
- charts/
109
- common/
1110
- tests/
11+
- requirements.yml
12+
- values-*
1213

1314
# warn_list:
1415
# - yaml

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
# match black default
3+
max-line-length = 88

.github/workflows/ansible-lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ jobs:
1111
- uses: actions/checkout@v4
1212

1313
- name: Lint Ansible Playbook
14-
uses: ansible/ansible-lint-action@v6
15-
# Let's point it to the path
16-
with:
17-
path: "ansible/"
14+
uses: ansible/ansible-lint@06f616d6e86e9ce4c74393318d1cbb2d016af413
15+
# Let's point it to the path

.github/workflows/jsonschema.yaml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,19 @@
11
---
22
name: Verify json schema
33

4-
#
5-
# Documentation:
6-
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
7-
#
8-
9-
#############################
10-
# Start the job on all push #
11-
#############################
124
on: [push, pull_request]
135

14-
###############
15-
# Set the Job #
16-
###############
176
jobs:
187
jsonschema_tests:
19-
# Name the Job
208
name: Json Schema tests
219
strategy:
2210
matrix:
2311
python-version: [3.11]
24-
# Set the agent to run on
2512
runs-on: ubuntu-latest
2613

27-
##################
28-
# Load all steps #
29-
##################
3014
steps:
31-
##########################
32-
# Checkout the code base #
33-
##########################
3415
- name: Checkout Code
3516
uses: actions/checkout@v4
36-
with:
37-
# Full git history is needed to get a proper list of changed files within `super-linter`
38-
fetch-depth: 0
3917

4018
- name: Set up Python ${{ matrix.python-version }}
4119
uses: actions/setup-python@v5
@@ -54,19 +32,19 @@ jobs:
5432

5533
- name: Verify secrets json schema against templates
5634
run: |
57-
# check-jsonschema needs .yaml as an extension
5835
cp ./values-secret.yaml.template ./values-secret.yaml
59-
check-jsonschema --schemafile ./common/ansible/roles/vault_utils/values-secrets.v2.schema.json values-secret.yaml
36+
check-jsonschema --fill-defaults --schemafile https://raw.githubusercontent.com/validatedpatterns/rhvp.cluster_utils/refs/heads/main/roles/vault_utils/values-secrets.v2.schema.json values-secret.yaml
6037
rm -f ./values-secret.yaml
6138
6239
- name: Verify ClusterGroup values.schema.json against values-*yaml files
6340
run: |
64-
set -e; for i in values-hub.yaml values-group-one.yaml; do
41+
set -e
42+
find . -maxdepth 1 -type f -name "values-*.yaml" ! -name "values-global.yaml" -print0 | while IFS= read -r -d '' i;
43+
do
6544
echo "$i"
6645
# disable shellcheck of single quotes in yq
6746
# shellcheck disable=2016
6847
yq eval-all '. as $item ireduce ({}; . * $item )' values-global.yaml "$i" > tmp.yaml
69-
check-jsonschema --schemafile ./common/clustergroup/values.schema.json tmp.yaml
48+
check-jsonschema --fill-defaults --schemafile https://raw.githubusercontent.com/validatedpatterns/clustergroup-chart/refs/heads/main/values.schema.json tmp.yaml
7049
rm -f tmp.yaml
71-
done
72-
50+
done

.github/workflows/linter.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/superlinter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# Run Linter against code base #
2222
################################
2323
- name: Lint Code Base
24-
uses: github/super-linter/slim@v6
24+
uses: super-linter/super-linter/slim@v7
2525
env:
2626
VALIDATE_ALL_CODEBASE: true
2727
DEFAULT_BRANCH: main
@@ -31,11 +31,14 @@ jobs:
3131
VALIDATE_BASH: false
3232
VALIDATE_CHECKOV: false
3333
VALIDATE_JSCPD: false
34+
VALIDATE_JSON_PRETTIER: false
35+
VALIDATE_MARKDOWN_PRETTIER: false
3436
VALIDATE_KUBERNETES_KUBECONFORM: false
3537
VALIDATE_PYTHON_PYLINT: false
3638
VALIDATE_SHELL_SHFMT: false
3739
VALIDATE_YAML: false
40+
VALIDATE_YAML_PRETTIER: false
3841
# VALIDATE_DOCKERFILE_HADOLINT: false
3942
# VALIDATE_MARKDOWN: false
4043
# VALIDATE_NATURAL_LANGUAGE: false
41-
# VALIDATE_TEKTON: false
44+
# VALIDATE_TEKTON: false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ azure-env.sh
1919
openshift-install
2020
node_modules
2121
.envrc
22+
.ansible/

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

.releaserc.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
branches:
2-
- main
2+
- main
33
plugins:
4-
- "@semantic-release/commit-analyzer"
5-
- "@semantic-release/release-notes-generator"
6-
- "@semantic-release/github"
7-
- "@semantic-release/git"
4+
- "@semantic-release/commit-analyzer"
5+
- "@semantic-release/release-notes-generator"
6+
- "@semantic-release/github"
7+
- "@semantic-release/git"

0 commit comments

Comments
 (0)