Repository navigation
Add CI functionality #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mlorenzofr
merged 9 commits into
validatedpatterns:main
from
OAharoni-RedHat:add-singleArgoCD
Oct 23, 2026
Merged
Add CI functionality #186
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c96ff61
feat: Add new CI folder, initial changes to the pattern.sh
darkdoc 40a24db
feat: Add ci overridefile, will be used as extra helm opt in CI
darkdoc 6b0b2a8
fix: increase aws sizing
darkdoc 0527dcf
fix: pin rhtas and include extraValueFiles for pipeline
OAharoni-RedHat a6d57fb
fix: super linter failing due to readme
OAharoni-RedHat 9332f1a
fix: respond to comments
OAharoni-RedHat 1a405b6
fix: update setup-python version comment to match actual tag (v7 -> v…
OAharoni-RedHat 5750da0
fix: wait for ArgoCD convergence before completing install (add argo-…
OAharoni-RedHat 3a3b4a8
fix: wait for ArgoCD convergence before running CI tests
OAharoni-RedHat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,172 @@ | ||
| # These overrides are needed in CI system to test everything | ||
| # The CI will pass these overrides with | ||
| # EXTRA_HELM_OPTS='--set clusterGroup.sharedValueFiles[3]=/overrides/values-ci.yaml' | ||
| global: | ||
| registry: | ||
| enabled: true | ||
| domain: quay-registry-quay-quay-enterprise.apps.{{ .Values.global.clusterDomain }} | ||
| repository: ztvp/qtodo | ||
| user: quay-admin | ||
| vaultPath: "secret/data/hub/infra/quay/quay-users" | ||
| passwordVaultKey: "quay-admin-password" | ||
|
|
||
| clusterGroup: | ||
| namespaces: | ||
| openshift-storage: | ||
| operatorGroup: true | ||
| targetNamespace: openshift-storage | ||
| annotations: | ||
| openshift.io/cluster-monitoring: "true" | ||
| argocd.argoproj.io/sync-wave: "26" # Propagated to OperatorGroup by framework | ||
| quay-enterprise: | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "32" # Create before NooBaa and all Quay components | ||
| labels: | ||
| openshift.io/cluster-monitoring: "true" | ||
| trusted-artifact-signer: | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "32" # Auto-created by RHTAS operator | ||
| labels: | ||
| openshift.io/cluster-monitoring: "true" | ||
| rhtpa-operator: | ||
| operatorGroup: true | ||
| targetNamespace: rhtpa-operator | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "26" # Create before operator subscription | ||
| trusted-profile-analyzer: | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "32" # Create before RHTPA components | ||
| labels: | ||
| openshift.io/cluster-monitoring: "true" | ||
| openshift-pipelines: | ||
| subscriptions: | ||
| openshift-pipelines: | ||
| name: openshift-pipelines-operator-rh | ||
| namespace: openshift-operators | ||
| channel: pipelines-1.23 | ||
| odf: | ||
| name: odf-operator | ||
| namespace: openshift-storage | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "27" # Install after OperatorGroup (26) | ||
| quay-operator: | ||
| name: quay-operator | ||
| namespace: openshift-operators | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "28" # Install after ODF operator | ||
| rhtas-operator: | ||
| name: rhtas-operator | ||
| namespace: openshift-operators | ||
| channel: stable-v1.4 | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "29" # Install after Quay operator, before applications | ||
| catalogSource: redhat-operators | ||
| rhtpa-operator: | ||
| name: rhtpa-operator | ||
| namespace: rhtpa-operator # MUST use dedicated namespace (not openshift-operators) | ||
| catalogSource: redhat-operators | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "27" # Install after OperatorGroup (26), before applications | ||
| applications: | ||
| noobaa-mcg: | ||
| name: noobaa-mcg | ||
| namespace: openshift-storage | ||
| argoProject: hub | ||
| path: charts/noobaa-mcg | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "36" # Deploy after core services | ||
| quay-registry: | ||
| name: quay-registry | ||
| namespace: quay-enterprise | ||
| argoProject: hub | ||
| chart: quay | ||
| chartVersion: 0.2.* | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "41" # Deploy after NooBaa storage backend | ||
| extraValueFiles: | ||
| - /overrides/values-quay.yaml | ||
| trusted-artifact-signer: | ||
| name: trusted-artifact-signer | ||
| namespace: trusted-artifact-signer | ||
| argoProject: hub | ||
| path: charts/rhtas-operator | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "46" # Deploy after dependencies | ||
| overrides: | ||
| - name: rhtas.zeroTrust.spire.enabled | ||
| value: "true" | ||
| - name: rhtas.zeroTrust.spire.trustDomain | ||
| value: "apps.{{ $.Values.global.clusterDomain }}" | ||
| - name: rhtas.zeroTrust.spire.issuer | ||
| value: "https://spire-spiffe-oidc-discovery-provider.apps.{{ $.Values.global.clusterDomain }}" | ||
| - name: rhtas.zeroTrust.email.enabled | ||
| value: "true" | ||
| - name: rhtas.zeroTrust.email.issuer | ||
| value: https://keycloak.apps.{{ $.Values.global.clusterDomain }}/realms/ztvp | ||
| trusted-profile-analyzer: | ||
| name: trusted-profile-analyzer | ||
| namespace: trusted-profile-analyzer | ||
| argoProject: hub | ||
| path: charts/rhtpa-operator | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "41" # Create chart resources (OBC, DB, etc.) | ||
| ignoreDifferences: | ||
| - group: batch | ||
| kind: Job | ||
| jsonPointers: | ||
| - /status | ||
| qtodo: | ||
| overrides: | ||
| - name: app.oidc.enabled | ||
| value: "true" | ||
| - name: app.spire.enabled | ||
| value: "true" | ||
| - name: app.vault.url | ||
| value: https://vault.vault.svc.cluster.local:8200 | ||
| - name: app.vault.role | ||
| value: qtodo | ||
| - name: app.vault.secretPath | ||
| value: secret/data/apps/qtodo/qtodo-db | ||
| extraValueFiles: | ||
| - '/overrides/values-ci.yaml' | ||
| tekton-chains: | ||
| name: tekton-chains | ||
| project: hub | ||
| path: charts/tekton-chains | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "47" | ||
| supply-chain: | ||
| name: supply-chain | ||
| argoProject: hub | ||
| path: charts/supply-chain | ||
| annotations: | ||
| argocd.argoproj.io/sync-wave: "48" | ||
| ignoreDifferences: | ||
| - kind: ServiceAccount | ||
| jqPathExpressions: | ||
| - .imagePullSecrets[]|select(.name | contains("-dockercfg-")) | ||
| - group: tekton.dev | ||
| kind: Task | ||
| jsonPointers: | ||
| - /spec/steps | ||
| - group: tekton.dev | ||
| kind: Pipeline | ||
| jsonPointers: | ||
| - /spec/tasks | ||
| overrides: | ||
| - name: registry.tlsVerify | ||
| value: "false" | ||
| - name: rhtas.enabled | ||
| value: "true" | ||
| - name: rhtpa.enabled | ||
| value: "true" | ||
| - name: pipelinerun.enabled | ||
| value: "true" | ||
| extraValueFiles: | ||
| - '/overrides/values-ci.yaml' | ||
| acs-central: | ||
| overrides: | ||
| - name: integration.quay.enabled | ||
| value: "true" | ||
| - name: integration.quay.url | ||
| value: "quay-quay-enterprise.apps.{{ .Values.global.domain }}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # The requirements.txt file is just a placeholder to show the installed packages in the utility container | ||
|
|
||
| <https://github.com/validatedpatterns/utility-container/blob/main/requirements.txt> | ||
|
|
||
| ## The ci will run pytest based on file pattern | ||
|
|
||
| pytest -lv test_\<TARGET_CLUSTERGROUP\>.py --junit-xml .results/test_\<TARGET_CLUSTERGROUP\>.xml | ||
|
|
||
| ## To run upstream tests locally | ||
|
|
||
| Set the env variables pointing to the clusters needed to run the tests on: | ||
| `HUBCONFIG` (`SPOKECONFIG` if applicable) pointing to the kubconfig of hub (and spoke) clusters | ||
| `TARGET_CLUSTERGROUP` if its different from the default (values-global.yaml main.clusterGroupName) | ||
| Test logs and junit-xml will be saved in ci/.results/ | ||
| Run from repository root | ||
|
|
||
| ```bash | ||
| ./pattern.sh make run-ci-tests | ||
| ``` | ||
|
|
||
| ## Writing additonal tests | ||
|
|
||
| The openshift_dyn_client fixture will return a DynamicClient which can be used inside test functions. | ||
| It requires only an env variable param to use it as a kubeconfig. | ||
|
|
||
| ```python | ||
| @pytest.mark.parametrize( | ||
| "openshift_dyn_client", | ||
| ["HUBCONFIG"], | ||
| indirect=True, | ||
| ) | ||
| ``` | ||
|
|
||
| If your tests requires additional python packages, you might want to either run them fully locally in a venv or similar. | ||
| Or if you want to use the pattern framework (make/Ansible wrappers) you need to use your own util container | ||
|
|
||
| ```bash | ||
| PATTERN_UTILITY_CONTAINER="your_utility container" ./pattern.sh make run-ci-tests | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __version__ = "0.1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from validatedpatterns_tests.interop.conftest_openshift import * # noqa: F401, F403 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ansible-core==2.18.* | ||
| ansible-runner | ||
| awxkit | ||
| kubernetes | ||
| openshift | ||
| boto3>=1.21 | ||
| botocore>=1.24 | ||
| awscli>=1.22 | ||
| azure-cli>=2.34 | ||
| gcloud | ||
| humanize | ||
| pytz | ||
| pytest | ||
| junitparser | ||
| vp-qe-test-common @ git+https://github.com/darkdoc/vp-qe-test-common.git@v1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.