Skip to content

Commit e6165a6

Browse files
authored
Merge branch 'main' into feat/noble
2 parents 9fd442f + e70cc3d commit e6165a6

File tree

112 files changed

+3141
-2361
lines changed

Some content is hidden

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

112 files changed

+3141
-2361
lines changed

.ansible-lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
skip_list:
3+
- role-name
4+
# Unresolved issues with parsing jinja in multiline strings
5+
# https://github.com/ansible/ansible-lint/issues/3935
6+
- jinja[spacing]
7+
- galaxy[no-changelog]
8+
9+
warn_list:
10+
- var-naming
11+
12+
exclude_paths:
13+
- .ansible/**
14+
- .github/**

.checkov.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
skip-check:
3+
# Requires all blocks to have rescue: - not considered appropriate
4+
- CKV2_ANSIBLE_3

.github/linters/.checkov.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.checkov.yaml

.github/linters/.yamllint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.yamllint.yml

.github/workflows/lint.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Lint
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
# To report GitHub Actions status checks
11+
statuses: write
12+
13+
jobs:
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: read
20+
# To report GitHub Actions status checks
21+
statuses: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
# super-linter needs the full git history to get the
27+
# list of files that changed across commits
28+
fetch-depth: 0
29+
submodules: true
30+
31+
- name: Run ansible-lint
32+
uses: ansible/[email protected]
33+
34+
- name: Load super-linter configuration
35+
# Use grep inverse matching to exclude eventual comments in the .env file
36+
# because the GitHub Actions command to set environment variables doesn't
37+
# support comments.
38+
# yamllint disable-line rule:line-length
39+
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
40+
run: grep -v '^#' super-linter.env >> "$GITHUB_ENV"
41+
if: always()
42+
43+
- name: Run super-linter
44+
uses: super-linter/[email protected]
45+
if: always()
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-azimuth.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Test Azimuth
3+
4+
permissions:
5+
contents: read
6+
packages: write
7+
# To report GitHub Actions status checks
8+
statuses: write
9+
id-token: write
10+
11+
on:
12+
workflow_call:
13+
14+
jobs:
15+
test_azimuth:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Check out the configuration repository
19+
- name: Set up Azimuth environment
20+
uses: azimuth-cloud/azimuth-config/.github/actions/setup@devel
21+
with:
22+
os-clouds: ${{ secrets.OS_CLOUDS }}
23+
environment-prefix: ops-ci
24+
azimuth-ops-version: ${{ github.event.pull_request.head.sha }}
25+
target-cloud: ${{ vars.TARGET_CLOUD }}
26+
# GitHub terminates jobs after 6 hours
27+
# We don't want jobs to acquire the lock then get timed out before they can finish
28+
# So wait a maximum of 3 hours to acquire the lock, leaving 3 hours for other tasks in the job
29+
timeout-minutes: 180
30+
31+
# Provision Azimuth using the azimuth-ops version under test
32+
- name: Provision Azimuth
33+
uses: azimuth-cloud/azimuth-config/.github/actions/provision@devel
34+
35+
# # Run the tests
36+
- name: Run Azimuth tests
37+
uses: azimuth-cloud/azimuth-config/.github/actions/test@devel
38+
39+
# Tear down the environment
40+
- name: Destroy Azimuth
41+
uses: azimuth-cloud/azimuth-config/.github/actions/destroy@devel
42+
if: ${{ always() }}

.github/workflows/test-pr.yml

Lines changed: 63 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Test Azimuth deployment
22

3-
on:
3+
permissions:
4+
contents: read
5+
packages: write
6+
# To report GitHub Actions status checks
7+
statuses: write
8+
id-token: write
9+
10+
on: # yamllint disable-line rule:truthy
411
pull_request:
512
types:
613
- opened
@@ -9,20 +16,6 @@ on:
916
- reopened
1017
branches:
1118
- main
12-
paths-ignore:
13-
# Ignore any changes that are not actually code changes
14-
- .gitignore
15-
- CODEOWNERS
16-
- LICENSE
17-
- README.md
18-
- .github/release.yml
19-
- .github/workflows/update-dependencies.yml
20-
# Ignore any changes that only affect the HA install
21-
- playbooks/deploy_capi_mgmt.yml
22-
- playbooks/provision_capi_mgmt.yml
23-
- playbooks/restore.yml
24-
- roles/capi_cluster/**
25-
- roles/velero/**
2619

2720
# Use the head ref for workflow concurrency, with cancellation
2821
# This should mean that any previous workflows for a PR get cancelled when a new commit is pushed
@@ -33,50 +26,66 @@ concurrency:
3326
jobs:
3427
# This job exists so that PRs from outside the main repo are rejected
3528
fail_on_remote:
29+
name: Fail on Remote
3630
runs-on: ubuntu-latest
3731
steps:
3832
- name: PR must be from a branch in the azimuth-cloud/ansible-collection-azimuth-ops repo
39-
run: exit ${{ github.repository == 'azimuth-cloud/ansible-collection-azimuth-ops' && '0' || '1' }}
33+
run: |
34+
if [ "${{ github.repository }}" != "azimuth-cloud/ansible-collection-azimuth-ops" ]; then
35+
exit 1
36+
fi
37+
lint:
38+
name: Lint
39+
uses: ./.github/workflows/lint.yml
40+
needs:
41+
- fail_on_remote
4042

41-
run_azimuth_tests:
42-
needs: [fail_on_remote]
43+
files_changed:
44+
name: Detect Files Changed
45+
needs:
46+
- fail_on_remote
47+
- lint
4348
runs-on: ubuntu-latest
49+
# Map a step output to a job output, this allows other jobs to be gated on the filter results
50+
outputs:
51+
paths: ${{ steps.filter.outputs.paths }}
4452
steps:
45-
# Check out the configuration repository
46-
- name: Set up Azimuth environment
47-
uses: azimuth-cloud/azimuth-config/.github/actions/setup@devel
48-
with:
49-
os-clouds: ${{ secrets.OS_CLOUDS }}
50-
environment-prefix: ops-ci
51-
azimuth-ops-version: ${{ github.event.pull_request.head.sha }}
52-
target-cloud: ${{ vars.TARGET_CLOUD }}
53-
# Remove when https://github.com/stackhpc/azimuth-config/pull/129 merges
54-
extra-vars: |
55-
generate_tests_caas_default_test_case_enabled: false
56-
generate_tests_caas_test_case_workstation_enabled: true
57-
generate_tests_caas_test_case_slurm_enabled: true
58-
generate_tests_caas_test_case_repo2docker_enabled: true
59-
generate_tests_caas_test_case_rstudio_enabled: true
60-
generate_tests_kubernetes_test_cases_latest_only: true
61-
generate_tests_kubernetes_apps_default_test_case_enabled: false
62-
generate_tests_kubernetes_apps_test_case_jupyterhub_enabled: true
63-
generate_tests_kubernetes_apps_test_case_daskhub_enabled: true
64-
# Test Flux install in CI even when disabled in default config
65-
flux_enabled: true
66-
# GitHub terminates jobs after 6 hours
67-
# We don't want jobs to acquire the lock then get timed out before they can finish
68-
# So wait a maximum of 3 hours to acquire the lock, leaving 3 hours for other tasks in the job
69-
timeout-minutes: 180
53+
- name: Checkout
54+
uses: actions/checkout@v4
7055

71-
# Provision Azimuth using the azimuth-ops version under test
72-
- name: Provision Azimuth
73-
uses: azimuth-cloud/azimuth-config/.github/actions/provision@devel
74-
75-
# # Run the tests
76-
- name: Run Azimuth tests
77-
uses: azimuth-cloud/azimuth-config/.github/actions/test@devel
56+
- name: Paths Filter
57+
# For safety using commit of dorny/paths-filter@v3
58+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
59+
id: filter
60+
with:
61+
# Default predicate is 'some' which gives a match if any one filter matches.
62+
# Change the predicate to 'every' so the file has to match all filters,
63+
# to model 'paths-ignore' we match only if we've exluded all unwanted files.
64+
predicate-quantifier: 'every'
65+
filters: |
66+
paths:
67+
# Ignore any changes that are not actually code changes
68+
- "!.gitignore"
69+
- "!CODEOWNERS"
70+
- "!LICENSE"
71+
- "!README.md"
72+
- "!.github/release.yml"
73+
- "!.github/workflows/update-dependencies.yml"
74+
# Ignore any changes that only affect the HA install
75+
- "!playbooks/deploy_capi_mgmt.yml"
76+
- "!playbooks/provision_capi_mgmt.yml"
77+
- "!playbooks/restore.yml"
78+
- "!roles/capi_cluster/**"
79+
- "!roles/velero/**"
7880
79-
# Tear down the environment
80-
- name: Destroy Azimuth
81-
uses: azimuth-cloud/azimuth-config/.github/actions/destroy@devel
82-
if: ${{ always() }}
81+
run_azimuth_tests:
82+
# Use the output of the above filter to check if the files listed under "paths" have changed.
83+
# We can negate this check to run an alternative job,
84+
# we can add additional filters like "paths" and action on those.
85+
# Example: https://github.com/getsentry/sentry/blob/2ebe01feab863d89aa7564e6d243b6d80c230ddc/.github/workflows/backend.yml#L36
86+
name: Run Azimuth Tests
87+
needs:
88+
- files_changed
89+
if: needs.files_changed.outputs.paths == 'true'
90+
uses: ./.github/workflows/test-azimuth.yml
91+
secrets: inherit

.github/workflows/update-dependencies.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# This workflow proposes updates to the dependencies that dependabot cannot
22
name: Update dependencies
33

4-
on:
4+
permissions:
5+
contents: write
6+
id-token: write
7+
pull-requests: write
8+
9+
on: # yamllint disable-line rule:truthy
510
# Allow manual executions
611
workflow_dispatch:
712
# Run nightly
@@ -57,6 +62,12 @@ jobs:
5762
prereleases: "yes"
5863
version_jsonpath: azimuth_apps_operator_chart_version
5964

65+
- key: azimuth-authorization-webhook
66+
path: ./roles/azimuth_authorization_webhook/defaults/main.yaml
67+
repository: azimuth-cloud/azimuth-authorization-webhook
68+
prereleases: "yes"
69+
version_jsonpath: azimuth_authorization_webhook_chart_version
70+
6071
- key: azimuth-caas-operator
6172
path: ./roles/azimuth_caas_operator/defaults/main.yml
6273
repository: azimuth-cloud/azimuth-caas-operator
@@ -165,6 +176,11 @@ jobs:
165176
repository: kubernetes-sigs/kustomize
166177
version_jsonpath: kustomize_version
167178

179+
- key: provider-keycloak
180+
path: ./roles/crossplane/defaults/main.yml
181+
repository: crossplane-contrib/provider-keycloak
182+
version_jsonpath: crossplane_keycloak_provider_version
183+
168184
- key: velero-cli
169185
path: ./roles/velero/defaults/main.yml
170186
repository: vmware-tanzu/velero
@@ -244,6 +260,12 @@ jobs:
244260
chart_name_jsonpath: cloud_metrics_grafana_chart_name
245261
chart_version_jsonpath: cloud_metrics_grafana_chart_version
246262

263+
- key: crossplane
264+
path: ./roles/crossplane/defaults/main.yml
265+
chart_repo_jsonpath: crossplane_chart_repo
266+
chart_name_jsonpath: crossplane_chart_name
267+
chart_version_jsonpath: crossplane_chart_version
268+
247269
- key: flux
248270
path: ./roles/flux/defaults/main.yml
249271
chart_repo_jsonpath: flux_chart_repo

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.ansible
12
.python-version
23
.bin
34
.terraform

.yamllint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
brackets:
6+
forbid: non-empty
7+
comments:
8+
# https://github.com/prettier/prettier/issues/6780
9+
min-spaces-from-content: 1
10+
# https://github.com/adrienverge/yamllint/issues/384
11+
comments-indentation: false
12+
document-start: disable
13+
# 160 chars was the default used by old E204 rule, but
14+
# you can easily change it or disable in your .yamllint file.
15+
line-length:
16+
max: 160
17+
# We are adding an extra space inside braces as that's how prettier does it
18+
# and we are trying not to fight other linters.
19+
braces:
20+
min-spaces-inside: 0 # yamllint defaults to 0
21+
max-spaces-inside: 1 # yamllint defaults to 0
22+
octal-values:
23+
forbid-implicit-octal: true # yamllint defaults to false
24+
forbid-explicit-octal: true # yamllint defaults to false

0 commit comments

Comments
 (0)