Skip to content

Commit 7d4c001

Browse files
authored
Initial commit
0 parents  commit 7d4c001

81 files changed

Lines changed: 3141 additions & 0 deletions

File tree

Some content is hidden

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

.ansible-lint

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Vim filetype=yaml
2+
---
3+
offline: false
4+
#requirements: ansible/execution_environment/requirements.yml
5+
6+
exclude_paths:
7+
- .cache/
8+
- .github/
9+
- charts/
10+
- common/
11+
- tests/
12+
13+
# warn_list:
14+
# - yaml
15+
# - schema
16+
# - experimental
17+
# - risky-file-permissions
18+
# - var-spacing

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
version: 2
3+
updates:
4+
# Check for updates to GitHub Actions every week
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+

.github/linters/.gitleaks.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[whitelist]
2+
# As of v4, gitleaks only matches against filename, not path in the
3+
# files directive. Leaving content for backwards compatibility.
4+
files = [
5+
"ansible/plugins/modules/*.py",
6+
"ansible/tests/unit/test_*.py",
7+
"ansible/tests/unit/*.yaml",
8+
"ansible/tests/unit/v2/*.yaml",
9+
]

.github/linters/.markdown-lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"default": true,
3+
"MD003": false,
4+
"MD013": false,
5+
"MD033": false
6+
}

.github/workflows/ansible-lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Ansible Lint # feel free to pick your own name
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
# Important: This sets up your GITHUB_WORKSPACE environment variable
11+
- uses: actions/checkout@v4
12+
13+
- name: Lint Ansible Playbook
14+
uses: ansible/ansible-lint-action@v6
15+
# Let's point it to the path
16+
with:
17+
path: "ansible/"

.github/workflows/jsonschema.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Verify json schema
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
jsonschema_tests:
8+
name: Json Schema tests
9+
strategy:
10+
matrix:
11+
python-version: [3.11]
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install check-jsonschema
27+
28+
- name: Install yq
29+
uses: chrisdickinson/setup-yq@latest
30+
with:
31+
yq-version: v4.30.7
32+
33+
- name: Verify secrets json schema against templates
34+
run: |
35+
cp ./values-secret.yaml.template ./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
37+
rm -f ./values-secret.yaml
38+
39+
- name: Verify ClusterGroup values.schema.json against values-*yaml files
40+
run: |
41+
set -e; for i in values-hub.yaml values-group-one.yaml; do
42+
echo "$i"
43+
# disable shellcheck of single quotes in yq
44+
# shellcheck disable=2016
45+
yq eval-all '. as $item ireduce ({}; . * $item )' values-global.yaml "$i" > tmp.yaml
46+
check-jsonschema --fill-defaults --schemafile https://raw.githubusercontent.com/validatedpatterns/clustergroup-chart/refs/heads/main/values.schema.json tmp.yaml
47+
rm -f tmp.yaml
48+
done
49+

.github/workflows/superlinter.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Super linter
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
build:
8+
# Name the Job
9+
name: Super linter
10+
# Set the agent to run on
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
with:
17+
# Full git history is needed to get a proper list of changed files within `super-linter`
18+
fetch-depth: 0
19+
20+
################################
21+
# Run Linter against code base #
22+
################################
23+
- name: Lint Code Base
24+
uses: super-linter/super-linter/slim@v7
25+
env:
26+
VALIDATE_ALL_CODEBASE: true
27+
DEFAULT_BRANCH: main
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
# These are the validation we disable atm
30+
VALIDATE_ANSIBLE: false
31+
VALIDATE_BASH: false
32+
VALIDATE_CHECKOV: false
33+
VALIDATE_JSCPD: false
34+
VALIDATE_JSON_PRETTIER: false
35+
VALIDATE_MARKDOWN_PRETTIER: false
36+
VALIDATE_KUBERNETES_KUBECONFORM: false
37+
VALIDATE_PYTHON_PYLINT: false
38+
VALIDATE_SHELL_SHFMT: false
39+
VALIDATE_YAML: false
40+
VALIDATE_YAML_PRETTIER: false
41+
# VALIDATE_DOCKERFILE_HADOLINT: false
42+
# VALIDATE_MARKDOWN: false
43+
# VALIDATE_NATURAL_LANGUAGE: false
44+
# VALIDATE_TEKTON: false
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This job requires a secret called DOCS_TOKEN which should be a PAT token
2+
# that has the permissions described in:
3+
# validatedpatterns/docs/.github/workflows/metadata-docs.yml@main
4+
---
5+
name: Update docs pattern metadata
6+
7+
on:
8+
push:
9+
paths:
10+
- "pattern-metadata.yaml"
11+
- ".github/workflows/update-metadata.yml"
12+
13+
jobs:
14+
update-metadata:
15+
uses: validatedpatterns/docs/.github/workflows/metadata-docs.yml@main
16+
permissions: # Workflow-level permissions
17+
contents: read # Required for "read-all"
18+
packages: write # Allows writing to packages
19+
id-token: write # Allows creating OpenID Connect (OIDC) tokens
20+
secrets: inherit
21+
# For testing you can point to a different branch in the docs repository
22+
# with:
23+
# DOCS_BRANCH: "main"

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*~
2+
*.swp
3+
*.swo
4+
values-secret*
5+
.*.expected.yaml
6+
pattern-vault.init
7+
vault.init
8+
super-linter.log
9+
common/pattern-vault.init

.gitleaks.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/linters/.gitleaks.toml

0 commit comments

Comments
 (0)