You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Here lies your validation code or the entrypoint for more complex validation processes
702
729
703
-
The library also offers a convenient base class [`com.cloudogu.gitops.gitopsbuildlib.Validator`](src/com/cloudogu/gitopsbuildlib/Validator.groovy).
704
-
However, this seems impossible to use with neither dynamic library loading via the `library()` nor with `@Library`,
705
-
because the library is loaded after the class is evaluated.
730
+
`SourceType[] getSupportedSourceTypes()`
731
+
- This method returns a collection of supported Source Types.
732
+
The SourceType determines which resources are going to be validated.
733
+
There are two locations where resources can be validated.
734
+
They are differentiated by the resource-type of which there are two right now.
735
+
- Helm resources
736
+
- Plain k8s resources
737
+
738
+
739
+
**Visual representation of the folder structure on the Jenkins agent**
740
+
```
741
+
├── jenkinsworkdir/
742
+
└── .configRepoTempDir/
743
+
└── ${stage}/
744
+
└── ${application}/
745
+
├── extraResources/
746
+
├── generatedResources/
747
+
├── deployment.yaml
748
+
└── ...
749
+
└── .helmChartTempDir/
750
+
└── chart/
751
+
└── ${chartPath}/ (for git repo) or ${chartName}/ (for helm repo)
752
+
└── mergedValues.yaml
753
+
```
754
+
755
+
**Helm resources** - `.helmChartTempDir`:
756
+
This location is only temporary and is being used for the helm chart to be downloaded and the mergedValues.file (values-shared.yaml + values-${stage}.yaml)
757
+
Only Validators which support Helm schemas should operate on this folder
758
+
759
+
**Plain k8s resources** - `.configRepoTempDir`:
760
+
This location is for your plain k8s resources. This folder is also the gitops folder which will be pushed to the scm.
761
+
It contains your k8s resources in the root and two extra folders for additional k8s resources:
762
+
`extraResources`: Only needed for a Helm deployment if you whish to deploy plain k8s resources in addition to the helm deployment. See: [Important note in Namespaces](#namespaces)
763
+
`generatedResources`: If you have files which need to be deployed as a configMap. See: [Extra Files](#extra-files)
764
+
765
+
`GitopsTool[] getSupportedGitopsTools()`
766
+
This determins on which GitopsTool the validator will run. We implemented this feature since Argo already uses `helm template` and `kubeval` internally so we don't need `helm kubeval` since it does exactly the same.
767
+
So we defined `HelmKubeval` as only needed to be executed on a `FLUX` operator.
0 commit comments