diff --git a/build/bin/helm-lint.sh b/build/bin/helm-lint.sh index 097f3485d..eebb98b89 100755 --- a/build/bin/helm-lint.sh +++ b/build/bin/helm-lint.sh @@ -33,6 +33,8 @@ if [ ! -d "$CHART_PATH" ]; then exit 1 fi +helm dependency update "$CHART_PATH" || exit 1 + echo "--------" echo "Linting chart $CHART_PATH using Helm lint" helm lint "$CHART_PATH" || exit 1 diff --git a/cluster-applications/000-ibm-operator-catalog/Chart.yaml b/cluster-applications/000-ibm-operator-catalog/Chart.yaml index 0c7003475..4676983f7 100644 --- a/cluster-applications/000-ibm-operator-catalog/Chart.yaml +++ b/cluster-applications/000-ibm-operator-catalog/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-operator-catalog description: IBM Maximo Operator Catalog type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/000-ibm-operator-catalog/values.yaml b/cluster-applications/000-ibm-operator-catalog/values.yaml index 1017f0207..99d052af9 100644 --- a/cluster-applications/000-ibm-operator-catalog/values.yaml +++ b/cluster-applications/000-ibm-operator-catalog/values.yaml @@ -2,3 +2,5 @@ mas_catalog_version: v8-230414-amd64 mas_catalog_image: icr.io/cpopen/ibm-maximo-operator-catalog ibm_entitlement_key: "" +junitreporter: + devops_mongo_uri: \ No newline at end of file diff --git a/cluster-applications/010-redhat-cert-manager/Chart.yaml b/cluster-applications/010-redhat-cert-manager/Chart.yaml index edf97a65f..3b85a8946 100644 --- a/cluster-applications/010-redhat-cert-manager/Chart.yaml +++ b/cluster-applications/010-redhat-cert-manager/Chart.yaml @@ -3,3 +3,9 @@ name: redhat-cert-manager description: Redhat OpenShift cert-manager Operator type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/020-ibm-dro/Chart.yaml b/cluster-applications/020-ibm-dro/Chart.yaml index 68a930637..e8aa5d95c 100644 --- a/cluster-applications/020-ibm-dro/Chart.yaml +++ b/cluster-applications/020-ibm-dro/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-dro description: IBM DRO type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/021-ibm-dro-cleanup/Chart.yaml b/cluster-applications/021-ibm-dro-cleanup/Chart.yaml index fbf37cec1..0dfd8400b 100644 --- a/cluster-applications/021-ibm-dro-cleanup/Chart.yaml +++ b/cluster-applications/021-ibm-dro-cleanup/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-drop-cleanup description: IBM DRO (Cleanup) type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/030-ibm-cis-cert-manager/Chart.yaml b/cluster-applications/030-ibm-cis-cert-manager/Chart.yaml index 81048aabe..90b670a89 100644 --- a/cluster-applications/030-ibm-cis-cert-manager/Chart.yaml +++ b/cluster-applications/030-ibm-cis-cert-manager/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-cis-cert-manager description: IBM CIS Cert Manager type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/040-cis-compliance/Chart.yaml b/cluster-applications/040-cis-compliance/Chart.yaml index 1be84696a..40b647374 100644 --- a/cluster-applications/040-cis-compliance/Chart.yaml +++ b/cluster-applications/040-cis-compliance/Chart.yaml @@ -3,3 +3,9 @@ name: cis-compliance description: IBM CIS Compliance type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/041-cis-compliance-cleanup/Chart.yaml b/cluster-applications/041-cis-compliance-cleanup/Chart.yaml index 2ee6f5278..374b9b43a 100644 --- a/cluster-applications/041-cis-compliance-cleanup/Chart.yaml +++ b/cluster-applications/041-cis-compliance-cleanup/Chart.yaml @@ -3,3 +3,9 @@ name: cis-compliance-cleanup description: IBM CIS Compliance (Cleanup) type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/050-nfd-operator/Chart.yaml b/cluster-applications/050-nfd-operator/Chart.yaml index fd5f2da8e..391bfd79e 100644 --- a/cluster-applications/050-nfd-operator/Chart.yaml +++ b/cluster-applications/050-nfd-operator/Chart.yaml @@ -2,4 +2,10 @@ apiVersion: v2 name: nvidia-gpu-operator description: Nvidia GPU Operator type: application -version: 1.0.0 \ No newline at end of file +version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/051-nvidia-gpu-operator/Chart.yaml b/cluster-applications/051-nvidia-gpu-operator/Chart.yaml index fd5f2da8e..391bfd79e 100644 --- a/cluster-applications/051-nvidia-gpu-operator/Chart.yaml +++ b/cluster-applications/051-nvidia-gpu-operator/Chart.yaml @@ -2,4 +2,10 @@ apiVersion: v2 name: nvidia-gpu-operator description: Nvidia GPU Operator type: application -version: 1.0.0 \ No newline at end of file +version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/cluster-applications/200-cluster-promotion/Chart.yaml b/cluster-applications/200-cluster-promotion/Chart.yaml index be4e81283..023342bc9 100644 --- a/cluster-applications/200-cluster-promotion/Chart.yaml +++ b/cluster-applications/200-cluster-promotion/Chart.yaml @@ -3,3 +3,9 @@ name: cluster-promotion description: Cluster Promotion type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/000-ibm-sync-resources/Chart.yaml b/instance-applications/000-ibm-sync-resources/Chart.yaml index a5fb115a4..90de1b6b5 100644 --- a/instance-applications/000-ibm-sync-resources/Chart.yaml +++ b/instance-applications/000-ibm-sync-resources/Chart.yaml @@ -5,3 +5,9 @@ description: | This ensures that these resources are not deleted before the PostDelete hooks get a chance to run. type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/010-ibm-sync-jobs/Chart.yaml b/instance-applications/010-ibm-sync-jobs/Chart.yaml index 0762ea393..3851188e6 100644 --- a/instance-applications/010-ibm-sync-jobs/Chart.yaml +++ b/instance-applications/010-ibm-sync-jobs/Chart.yaml @@ -7,3 +7,9 @@ description: | execution of the PostDelete hooks in this chart. type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/100-ibm-sls/Chart.yaml b/instance-applications/100-ibm-sls/Chart.yaml index eae462620..e9dc4af07 100644 --- a/instance-applications/100-ibm-sls/Chart.yaml +++ b/instance-applications/100-ibm-sls/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-sls description: IBM Suite License Service type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/110-ibm-cp4d-operators/Chart.yaml b/instance-applications/110-ibm-cp4d-operators/Chart.yaml index ce98b1436..5c483dd5d 100644 --- a/instance-applications/110-ibm-cp4d-operators/Chart.yaml +++ b/instance-applications/110-ibm-cp4d-operators/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-cp4d description: IBM Cloud Pak for Data (CP4D) type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/110-ibm-cp4d/Chart.yaml b/instance-applications/110-ibm-cp4d/Chart.yaml index 5386405a4..2c87aa96e 100644 --- a/instance-applications/110-ibm-cp4d/Chart.yaml +++ b/instance-applications/110-ibm-cp4d/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-cpd description: IBM Cloud Pak for Data (CPD) Instance type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/110-ibm-cs-control/Chart.yaml b/instance-applications/110-ibm-cs-control/Chart.yaml index b15518cd7..a5e1192b6 100644 --- a/instance-applications/110-ibm-cs-control/Chart.yaml +++ b/instance-applications/110-ibm-cs-control/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-cp4d description: IBM CommonServices Control type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/110-ibm-db2u/Chart.yaml b/instance-applications/110-ibm-db2u/Chart.yaml index 71f45919b..509d4b8eb 100644 --- a/instance-applications/110-ibm-db2u/Chart.yaml +++ b/instance-applications/110-ibm-db2u/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-db2u description: IBM DB2U type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-aiopenscale/Chart.yaml b/instance-applications/120-ibm-aiopenscale/Chart.yaml index d921a11e2..17be01395 100644 --- a/instance-applications/120-ibm-aiopenscale/Chart.yaml +++ b/instance-applications/120-ibm-aiopenscale/Chart.yaml @@ -2,4 +2,10 @@ apiVersion: v2 name: ibm-aiopenscale description: IBM Cloud Pak for Data Watson Openscale (AI Openscale) type: application -version: 1.0.0 \ No newline at end of file +version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-db2u-database/Chart.yaml b/instance-applications/120-ibm-db2u-database/Chart.yaml index 0f224009e..ce9a4b1e1 100644 --- a/instance-applications/120-ibm-db2u-database/Chart.yaml +++ b/instance-applications/120-ibm-db2u-database/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-db2u-database description: IBM DB2U Database type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-spark/Chart.yaml b/instance-applications/120-ibm-spark/Chart.yaml index 982dc30fb..e012551fb 100644 --- a/instance-applications/120-ibm-spark/Chart.yaml +++ b/instance-applications/120-ibm-spark/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-spark description: IBM Analytics Engine Powered by Apache Spark (Spark) type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-spss/Chart.yaml b/instance-applications/120-ibm-spss/Chart.yaml index 968ed771f..9c9f81ec4 100644 --- a/instance-applications/120-ibm-spss/Chart.yaml +++ b/instance-applications/120-ibm-spss/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-spss description: SPSS Modeler type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-wml/Chart.yaml b/instance-applications/120-ibm-wml/Chart.yaml index 9e08f49d8..8798664a0 100644 --- a/instance-applications/120-ibm-wml/Chart.yaml +++ b/instance-applications/120-ibm-wml/Chart.yaml @@ -4,3 +4,8 @@ description: IBM Watson Machine Learning (WML) type: application version: 1.0.0 +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/120-ibm-wsl/Chart.yaml b/instance-applications/120-ibm-wsl/Chart.yaml index a49784673..fc7d9fd26 100644 --- a/instance-applications/120-ibm-wsl/Chart.yaml +++ b/instance-applications/120-ibm-wsl/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-wsl description: IBM Watson Studio Local (WSL) type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-db2u-jdbc-config-rotate-password/Chart.yaml b/instance-applications/130-ibm-db2u-jdbc-config-rotate-password/Chart.yaml index f45ea5634..600338875 100644 --- a/instance-applications/130-ibm-db2u-jdbc-config-rotate-password/Chart.yaml +++ b/instance-applications/130-ibm-db2u-jdbc-config-rotate-password/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-db2u-jdbc-config-rotate-password description: IBM DB2U Rotate password JDBC Confifg type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-jdbc-config/Chart.yaml b/instance-applications/130-ibm-jdbc-config/Chart.yaml index 5fa41f31d..ef77324bb 100644 --- a/instance-applications/130-ibm-jdbc-config/Chart.yaml +++ b/instance-applications/130-ibm-jdbc-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-jdbc-config description: IBM JDBC Config type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-kafka-config/Chart.yaml b/instance-applications/130-ibm-kafka-config/Chart.yaml index 850499668..cb2e06235 100644 --- a/instance-applications/130-ibm-kafka-config/Chart.yaml +++ b/instance-applications/130-ibm-kafka-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-kafka-config description: Kafka Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-bas-config/Chart.yaml b/instance-applications/130-ibm-mas-bas-config/Chart.yaml index 5112a1c71..ca0d7d30b 100644 --- a/instance-applications/130-ibm-mas-bas-config/Chart.yaml +++ b/instance-applications/130-ibm-mas-bas-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-bas-config description: BAS Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-idp-config/Chart.yaml b/instance-applications/130-ibm-mas-idp-config/Chart.yaml index e09d50e8b..39a6eb3ef 100644 --- a/instance-applications/130-ibm-mas-idp-config/Chart.yaml +++ b/instance-applications/130-ibm-mas-idp-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-idp-config description: IDP Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-mongo-config/Chart.yaml b/instance-applications/130-ibm-mas-mongo-config/Chart.yaml index eb792a7cd..0d30e6247 100644 --- a/instance-applications/130-ibm-mas-mongo-config/Chart.yaml +++ b/instance-applications/130-ibm-mas-mongo-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-mongo-config description: Mongo Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-sls-config/Chart.yaml b/instance-applications/130-ibm-mas-sls-config/Chart.yaml index 59866eb8f..76d67f84d 100644 --- a/instance-applications/130-ibm-mas-sls-config/Chart.yaml +++ b/instance-applications/130-ibm-mas-sls-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-sls-config description: SLS Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-smtp-config/Chart.yaml b/instance-applications/130-ibm-mas-smtp-config/Chart.yaml index e210566cf..3d8ee4176 100644 --- a/instance-applications/130-ibm-mas-smtp-config/Chart.yaml +++ b/instance-applications/130-ibm-mas-smtp-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-smtp-config description: Smtp Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-mas-suite/Chart.yaml b/instance-applications/130-ibm-mas-suite/Chart.yaml index 956777838..e0235d165 100644 --- a/instance-applications/130-ibm-mas-suite/Chart.yaml +++ b/instance-applications/130-ibm-mas-suite/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-suite description: MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-objectstorage-config/Chart.yaml b/instance-applications/130-ibm-objectstorage-config/Chart.yaml index db061769b..1cef9d0f1 100644 --- a/instance-applications/130-ibm-objectstorage-config/Chart.yaml +++ b/instance-applications/130-ibm-objectstorage-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-objectstorage-config description: Objectstorage Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/130-ibm-watson-studio-config/Chart.yaml b/instance-applications/130-ibm-watson-studio-config/Chart.yaml index ffe30dec8..db2ac0baa 100644 --- a/instance-applications/130-ibm-watson-studio-config/Chart.yaml +++ b/instance-applications/130-ibm-watson-studio-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-watson-studio-config description: WatsonStudio Config for MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/220-ibm-mas-workspace/Chart.yaml b/instance-applications/220-ibm-mas-workspace/Chart.yaml index f8e0db372..113e9f561 100644 --- a/instance-applications/220-ibm-mas-workspace/Chart.yaml +++ b/instance-applications/220-ibm-mas-workspace/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-workspace description: MAS Core Platform Suite Workspace type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/500-540-ibm-mas-suite-app-install/Chart.yaml b/instance-applications/500-540-ibm-mas-suite-app-install/Chart.yaml index 39a9a07af..f5f1b7272 100644 --- a/instance-applications/500-540-ibm-mas-suite-app-install/Chart.yaml +++ b/instance-applications/500-540-ibm-mas-suite-app-install/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-suite-app-install description: Install Application on MAS Core Platform Suite type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/instance-applications/510-550-ibm-mas-suite-app-config/Chart.yaml b/instance-applications/510-550-ibm-mas-suite-app-config/Chart.yaml index efae0d41f..0896bc155 100644 --- a/instance-applications/510-550-ibm-mas-suite-app-config/Chart.yaml +++ b/instance-applications/510-550-ibm-mas-suite-app-config/Chart.yaml @@ -3,3 +3,9 @@ name: ibm-mas-suite-app-config description: MAS Core Platform Suite Application Configuration type: application version: 1.0.0 + +dependencies: +- name: junitreporter + version: 1.0.0 + repository: "file://../../sub-charts/junitreporter/" + condition: junitreporter.devops_mongo_uri != "" \ No newline at end of file diff --git a/root-applications/ibm-mas-cluster-root/templates/000-ibm-operator-catalog-app.yaml b/root-applications/ibm-mas-cluster-root/templates/000-ibm-operator-catalog-app.yaml index 320d2fe89..e10666de4 100644 --- a/root-applications/ibm-mas-cluster-root/templates/000-ibm-operator-catalog-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/000-ibm-operator-catalog-app.yaml @@ -41,6 +41,12 @@ spec: ibm_entitlement_key: "{{ .Values.ibm_operator_catalog.ibm_entitlement_key }}" mas_catalog_version: "{{ .Values.ibm_operator_catalog.mas_catalog_version }}" mas_catalog_image: "{{ .Values.ibm_operator_catalog.mas_catalog_image }}" + junitreporter: + reporter_name: "ibm-operator-catalog" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/010-ibm-redhat-cert-manager-app.yaml b/root-applications/ibm-mas-cluster-root/templates/010-ibm-redhat-cert-manager-app.yaml index 57ff8443e..970022602 100644 --- a/root-applications/ibm-mas-cluster-root/templates/010-ibm-redhat-cert-manager-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/010-ibm-redhat-cert-manager-app.yaml @@ -41,6 +41,12 @@ spec: sm_aws_secret_access_key: "{{ .Values.sm.aws_secret_access_key }}" channel: "{{ .Values.redhat_cert_manager.channel }}" run_sync_hooks: {{ .Values.redhat_cert_manager.run_sync_hooks }} + junitreporter: + reporter_name: "redhat-cert-manager" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/020-ibm-dro-app.yaml b/root-applications/ibm-mas-cluster-root/templates/020-ibm-dro-app.yaml index 7bb2a5146..23223f58a 100644 --- a/root-applications/ibm-mas-cluster-root/templates/020-ibm-dro-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/020-ibm-dro-app.yaml @@ -48,6 +48,12 @@ spec: dro_namespace: "{{ .Values.ibm_dro.dro_namespace }}" ibm_entitlement_key: "{{ .Values.ibm_dro.ibm_entitlement_key }}" dro_cmm_setup: "{{ .Values.ibm_dro.dro_cmm_setup }}" + junitreporter: + reporter_name: "ibm-dro" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.ibm_dro.dro_cmm_setup }} dro_cmm: auth_apikey: "{{ .Values.ibm_dro.dro_cmm.auth_apikey }}" diff --git a/root-applications/ibm-mas-cluster-root/templates/021-ibm-dro-cleanup.yaml b/root-applications/ibm-mas-cluster-root/templates/021-ibm-dro-cleanup.yaml index cadead532..2c25c7f20 100644 --- a/root-applications/ibm-mas-cluster-root/templates/021-ibm-dro-cleanup.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/021-ibm-dro-cleanup.yaml @@ -36,6 +36,12 @@ spec: - name: {{ .Values.avp.values_varname }} value: | dro_namespace: "{{ .Values.ibm_dro.dro_namespace }}" + junitreporter: + reporter_name: "ibm-dro-cleanup" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/030-ibm-cis-cert-manager.yaml b/root-applications/ibm-mas-cluster-root/templates/030-ibm-cis-cert-manager.yaml index caebaa916..3c7e856d9 100644 --- a/root-applications/ibm-mas-cluster-root/templates/030-ibm-cis-cert-manager.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/030-ibm-cis-cert-manager.yaml @@ -38,7 +38,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} - + junitreporter: + reporter_name: "ibm-cis-cert-manager" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" dns_provider: "{{ .Values.ibm_cis_cert_manager.dns_provider }}" ocp_cluster_domain: "{{ .Values.ibm_cis_cert_manager.ocp_cluster_domain }}" cis_apikey: "{{ .Values.ibm_cis_cert_manager.cis_apikey }}" diff --git a/root-applications/ibm-mas-cluster-root/templates/040-cis-compliance-app.yaml b/root-applications/ibm-mas-cluster-root/templates/040-cis-compliance-app.yaml index bb58d3698..156dca0aa 100644 --- a/root-applications/ibm-mas-cluster-root/templates/040-cis-compliance-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/040-cis-compliance-app.yaml @@ -34,6 +34,12 @@ spec: - name: {{ .Values.avp.values_varname }} value: | argo_namespace: "{{ .Values.argo.namespace }}" + junitreporter: + reporter_name: "cis-compliance" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/041-cis-compliance-cleanup.yaml b/root-applications/ibm-mas-cluster-root/templates/041-cis-compliance-cleanup.yaml index d449507e7..0c7384a3f 100644 --- a/root-applications/ibm-mas-cluster-root/templates/041-cis-compliance-cleanup.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/041-cis-compliance-cleanup.yaml @@ -36,6 +36,12 @@ spec: - name: {{ .Values.avp.values_varname }} value: | argo_namespace: "{{ .Values.argo.namespace }}" + junitreporter: + reporter_name: "cis-compliance-cleanup" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/050-nfd-operator-app.yaml b/root-applications/ibm-mas-cluster-root/templates/050-nfd-operator-app.yaml index 130a523dd..2bfba97da 100644 --- a/root-applications/ibm-mas-cluster-root/templates/050-nfd-operator-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/050-nfd-operator-app.yaml @@ -36,6 +36,12 @@ spec: argo_namespace: "{{ .Values.argo.namespace }}" nfd_namespace: "{{ .Values.nvidia_gpu_operator.nfd_namespace }}" nfd_channel: "{{ .Values.nvidia_gpu_operator.nfd_channel }}" + junitreporter: + reporter_name: "nfd-operator" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/051-nvidia-gpu-operator-app.yaml b/root-applications/ibm-mas-cluster-root/templates/051-nvidia-gpu-operator-app.yaml index 3182069d6..74f2390c3 100644 --- a/root-applications/ibm-mas-cluster-root/templates/051-nvidia-gpu-operator-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/051-nvidia-gpu-operator-app.yaml @@ -37,6 +37,12 @@ spec: gpu_channel: "{{ .Values.nvidia_gpu_operator.gpu_channel }}" gpu_driver_repository_path: "{{ .Values.nvidia_gpu_operator.gpu_driver_repository_path }}" gpu_driver_version: "{{ .Values.nvidia_gpu_operator.gpu_driver_version }}" + junitreporter: + reporter_name: "nvdia-gpu-operator" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/templates/099-instance-appset.yaml b/root-applications/ibm-mas-cluster-root/templates/099-instance-appset.yaml index bfb5ca8eb..f902a6a2d 100644 --- a/root-applications/ibm-mas-cluster-root/templates/099-instance-appset.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/099-instance-appset.yaml @@ -197,6 +197,10 @@ spec: value: "{{ .Values.avp.values_varname }}" - name: auto_delete value: "{{ .Values.auto_delete }}" + - name: devops.mongo_uri + value: "{{ .Values.devops.mongo_uri }}" + - name: devops.build_number + value: "{{ .Values.devops.build_number }}" destination: server: 'https://kubernetes.default.svc' namespace: {{ .Values.argo.namespace }} diff --git a/root-applications/ibm-mas-cluster-root/templates/200-cluster-promotion-app.yaml b/root-applications/ibm-mas-cluster-root/templates/200-cluster-promotion-app.yaml index c41b2e0ff..8693780ef 100644 --- a/root-applications/ibm-mas-cluster-root/templates/200-cluster-promotion-app.yaml +++ b/root-applications/ibm-mas-cluster-root/templates/200-cluster-promotion-app.yaml @@ -51,6 +51,12 @@ spec: target_pr_title: "{{ .Values.promotion.target_pr_title }}" mas_catalog_version: "{{ .Values.ibm_operator_catalog.mas_catalog_version }}" {{- end }} + junitreporter: + reporter_name: "cluster-promotion" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} diff --git a/root-applications/ibm-mas-cluster-root/values.yaml b/root-applications/ibm-mas-cluster-root/values.yaml index 6ef4faee6..938d203db 100644 --- a/root-applications/ibm-mas-cluster-root/values.yaml +++ b/root-applications/ibm-mas-cluster-root/values.yaml @@ -40,4 +40,8 @@ argo: auto_delete: false ibm_operator_catalog: - mas_catalog_version: xxx \ No newline at end of file + mas_catalog_version: xxx + +devops: + mongo_uri: + build_number: \ No newline at end of file diff --git a/root-applications/ibm-mas-instance-root/templates/000-ibm-sync-resources.yaml b/root-applications/ibm-mas-instance-root/templates/000-ibm-sync-resources.yaml index 06ccc6797..754ddcdc9 100644 --- a/root-applications/ibm-mas-instance-root/templates/000-ibm-sync-resources.yaml +++ b/root-applications/ibm-mas-instance-root/templates/000-ibm-sync-resources.yaml @@ -83,7 +83,12 @@ spec: {{- end }} - + junitreporter: + reporter_name: "ibm-sync-resources" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} diff --git a/root-applications/ibm-mas-instance-root/templates/010-ibm-sync-jobs.yaml b/root-applications/ibm-mas-instance-root/templates/010-ibm-sync-jobs.yaml index d1b59774b..3764740a9 100644 --- a/root-applications/ibm-mas-instance-root/templates/010-ibm-sync-jobs.yaml +++ b/root-applications/ibm-mas-instance-root/templates/010-ibm-sync-jobs.yaml @@ -90,6 +90,13 @@ spec: custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-sync-jobs" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" + mas_wipe_mongo_data: {{ .Values.mas_wipe_mongo_data }} - name: ARGOCD_APP_NAME diff --git a/root-applications/ibm-mas-instance-root/templates/100-ibm-sls-app.yaml b/root-applications/ibm-mas-instance-root/templates/100-ibm-sls-app.yaml index 241961683..28cbe082f 100644 --- a/root-applications/ibm-mas-instance-root/templates/100-ibm-sls-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/100-ibm-sls-app.yaml @@ -57,6 +57,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-sls" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: slsapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-app.yaml b/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-app.yaml index fa60712a0..19a05d21c 100644 --- a/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-app.yaml @@ -87,6 +87,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-cp4d" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cp4dapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-operator-app.yaml b/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-operator-app.yaml index aa0eca87a..c15c019ee 100644 --- a/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-operator-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/110-ibm-cp4d-operator-app.yaml @@ -79,6 +79,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-cp4d-operator" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cp4doperatorapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/110-ibm-cs-control-app.yaml b/root-applications/ibm-mas-instance-root/templates/110-ibm-cs-control-app.yaml index 6a91e88f6..fd25d3207 100644 --- a/root-applications/ibm-mas-instance-root/templates/110-ibm-cs-control-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/110-ibm-cs-control-app.yaml @@ -79,6 +79,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-cs-control" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cscontrolapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/110-ibm-db2u-app.yaml b/root-applications/ibm-mas-instance-root/templates/110-ibm-db2u-app.yaml index 30fd0ac4b..a67c78b92 100644 --- a/root-applications/ibm-mas-instance-root/templates/110-ibm-db2u-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/110-ibm-db2u-app.yaml @@ -41,6 +41,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-db2u" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: db2uapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/120-db2-databases-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-db2-databases-app.yaml index 0bc980aa0..dfd660b10 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-db2-databases-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-db2-databases-app.yaml @@ -47,6 +47,12 @@ spec: {{- if $.Values.custom_labels }} custom_labels: {{ $.Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "db2-db.{{ $.Values.instance.id }}.{{ $value.mas_application_id }}" + cluster_id: "{{ $.Values.cluster.id }}" + devops_mongo_uri: "{{ $.Values.devops.mongo_uri }}" + devops_build_number: "{{ $.Values.devops.build_number }}" + gitops_version: "{{ $.Values.source.revision }}" {{ $value | toYaml | nindent 12 }} - name: ARGOCD_APP_NAME value: "db2dbapp-{{ $value.mas_application_id }}" diff --git a/root-applications/ibm-mas-instance-root/templates/120-ibm-aiopenscale-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-ibm-aiopenscale-app.yaml index 1d2f40cb5..e2e2fab4f 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-ibm-aiopenscale-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-ibm-aiopenscale-app.yaml @@ -45,6 +45,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-aiopenscale" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cpdaiopenscaleapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/120-ibm-spark-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-ibm-spark-app.yaml index c9eec5518..9b9330ef3 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-ibm-spark-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-ibm-spark-app.yaml @@ -49,6 +49,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-spark" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cpdsparkapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/120-ibm-spss-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-ibm-spss-app.yaml index 80ed2c349..6a2899bec 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-ibm-spss-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-ibm-spss-app.yaml @@ -52,7 +52,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} - + junitreporter: + reporter_name: "ibm-spss" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cpdspssapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/120-ibm-wml-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-ibm-wml-app.yaml index e48619579..81caf7d79 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-ibm-wml-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-ibm-wml-app.yaml @@ -50,6 +50,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-wml" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cpdwmlapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/120-ibm-wsl-app.yaml b/root-applications/ibm-mas-instance-root/templates/120-ibm-wsl-app.yaml index bd7e4edd0..ca7144231 100644 --- a/root-applications/ibm-mas-instance-root/templates/120-ibm-wsl-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/120-ibm-wsl-app.yaml @@ -53,6 +53,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-wsl" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: cpdwslapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-app.yaml b/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-app.yaml index 8bf579d39..afdfdda96 100644 --- a/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-app.yaml @@ -110,6 +110,14 @@ spec: {{- end }} {{- end }} + + junitreporter: + reporter_name: "ibm-mas-suite" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" + - name: ARGOCD_APP_NAME value: suiteapp {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-configs-app.yaml b/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-configs-app.yaml index c33ab291a..51ab7c517 100644 --- a/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-configs-app.yaml +++ b/root-applications/ibm-mas-instance-root/templates/130-ibm-mas-suite-configs-app.yaml @@ -54,6 +54,12 @@ spec: custom_labels: {{ $.Values.custom_labels | toYaml | nindent 14 }} {{- end }} {{ $value | toYaml | nindent 12 }} + junitreporter: + reporter_name: "{{ $value.mas_config_chart }}" + cluster_id: "{{ $.Values.cluster.id }}" + devops_mongo_uri: "{{ $.Values.devops.mongo_uri }}" + devops_build_number: "{{ $.Values.devops.build_number }}" + gitops_version: "{{ $.Values.source.revision }}" - name: ARGOCD_APP_NAME value: {{ $value.mas_config_name }} {{- if not (empty $.Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/200-ibm-mas-workspaces.yaml b/root-applications/ibm-mas-instance-root/templates/200-ibm-mas-workspaces.yaml index 86eb69d20..ef6166fdc 100644 --- a/root-applications/ibm-mas-instance-root/templates/200-ibm-mas-workspaces.yaml +++ b/root-applications/ibm-mas-instance-root/templates/200-ibm-mas-workspaces.yaml @@ -44,6 +44,12 @@ spec: {{- if $.Values.custom_labels }} custom_labels: {{ $.Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-workspace-{{ $value.mas_workspace_id }}" + cluster_id: "{{ $.Values.cluster.id }}" + devops_mongo_uri: "{{ $.Values.devops.mongo_uri }}" + devops_build_number: "{{ $.Values.devops.build_number }}" + gitops_version: "{{ $.Values.source.revision }}" - name: ARGOCD_APP_NAME value: "workspaceapp-{{ $value.mas_workspace_id }}" {{- if not (empty $.Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/500-ibm-mas-masapp-manage-install.yaml b/root-applications/ibm-mas-instance-root/templates/500-ibm-mas-masapp-manage-install.yaml index 80cc4cfde..00ff06cfe 100644 --- a/root-applications/ibm-mas-instance-root/templates/500-ibm-mas-masapp-manage-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/500-ibm-mas-masapp-manage-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-manage" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "manage-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml b/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml index 734dfc2c9..3edd6fc14 100644 --- a/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml +++ b/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml @@ -93,6 +93,13 @@ spec: custom_labels: {{ $.Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-config-{{ $value.mas_app_id }}-{{ $value.mas_workspace_id }}" + cluster_id: "{{ $.Values.cluster.id }}" + devops_mongo_uri: "{{ $.Values.devops.mongo_uri }}" + devops_build_number: "{{ $.Values.devops.build_number }}" + gitops_version: "{{ $.Values.source.revision }}" + - name: ARGOCD_APP_NAME value: "ma-cfg-{{ $value.mas_app_id }}" {{- if not (empty $.Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-assist-install.yaml b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-assist-install.yaml index c1921a167..dd12fe236 100644 --- a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-assist-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-assist-install.yaml @@ -58,6 +58,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-assist" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" mas_app_spec: {{ .Values.ibm_suite_app_assist_install.mas_app_spec | toYaml | nindent 14 }} - name: ARGOCD_APP_NAME value: "assist-install" diff --git a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-iot-install.yaml b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-iot-install.yaml index 73405a5c6..8ac7f8e52 100644 --- a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-iot-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-iot-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-iot" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "iot-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-visualinspection-install.yaml b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-visualinspection-install.yaml index c690b84fe..33a9f5e69 100644 --- a/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-visualinspection-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/510-ibm-mas-masapp-visualinspection-install.yaml @@ -60,7 +60,12 @@ spec: custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} gpu_request_quota: "{{ .Values.ibm_suite_app_visualinspection_install.gpu_request_quota }}" - + junitreporter: + reporter_name: "ibm-mas-suite-app-install-visualinspection" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "visualinspection-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-health-install.yaml b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-health-install.yaml index d1b7e7658..ea2549f3d 100644 --- a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-health-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-health-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-health" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "health-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-monitor-install.yaml b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-monitor-install.yaml index 0f2a11bd5..87fba0312 100644 --- a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-monitor-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-monitor-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-monitor" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "monitor-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-optimizer-install.yaml b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-optimizer-install.yaml index 4d4e06c13..bb1c779db 100644 --- a/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-optimizer-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/520-ibm-mas-masapp-optimizer-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-optimizer" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "optimizer-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/templates/540-ibm-mas-masapp-predict-install.yaml b/root-applications/ibm-mas-instance-root/templates/540-ibm-mas-masapp-predict-install.yaml index ed7188a99..4d61ac860 100644 --- a/root-applications/ibm-mas-instance-root/templates/540-ibm-mas-masapp-predict-install.yaml +++ b/root-applications/ibm-mas-instance-root/templates/540-ibm-mas-masapp-predict-install.yaml @@ -59,6 +59,12 @@ spec: {{- if .Values.custom_labels }} custom_labels: {{ .Values.custom_labels | toYaml | nindent 14 }} {{- end }} + junitreporter: + reporter_name: "ibm-mas-suite-app-install-predict" + cluster_id: "{{ .Values.cluster.id }}" + devops_mongo_uri: "{{ .Values.devops.mongo_uri }}" + devops_build_number: "{{ .Values.devops.build_number }}" + gitops_version: "{{ .Values.source.revision }}" - name: ARGOCD_APP_NAME value: "predict-install" {{- if not (empty .Values.avp.secret) }} diff --git a/root-applications/ibm-mas-instance-root/values.yaml b/root-applications/ibm-mas-instance-root/values.yaml index 2da1ae786..6555471a9 100644 --- a/root-applications/ibm-mas-instance-root/values.yaml +++ b/root-applications/ibm-mas-instance-root/values.yaml @@ -43,3 +43,7 @@ sm: aws_access_key_id: xxxx run_sanity_test: false + +devops: + mongo_uri: + build_number: \ No newline at end of file diff --git a/sub-charts/junitreporter/Chart.yaml b/sub-charts/junitreporter/Chart.yaml new file mode 100644 index 000000000..349d54d94 --- /dev/null +++ b/sub-charts/junitreporter/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +name: junitreporter +description: | + Updates the devops database when a argo app is first synched and then marks it complete + along with a junit xml test result. +type: application +version: 1.0.0 diff --git a/sub-charts/junitreporter/README.md b/sub-charts/junitreporter/README.md new file mode 100644 index 000000000..6483b665a --- /dev/null +++ b/sub-charts/junitreporter/README.md @@ -0,0 +1,3 @@ +Junitreporter +=============================================================================== +Updates the devops database when a argo app is first synched and then marks it complete along with a junit xml test result. \ No newline at end of file diff --git a/sub-charts/junitreporter/templates/00-presync-report-starter.yaml b/sub-charts/junitreporter/templates/00-presync-report-starter.yaml new file mode 100644 index 000000000..89a70ae89 --- /dev/null +++ b/sub-charts/junitreporter/templates/00-presync-report-starter.yaml @@ -0,0 +1,189 @@ +{{- if .Values.devops_mongo_uri }} + + +{{ $prefix := printf "pre-junitreporter-%s" .Values.reporter_name }} +{{ $secret := printf "%s-devopsuri" $prefix }} +{{ $role_name := printf "%s-role" $prefix }} +{{ $rb_name := printf "%s-rb" $prefix }} +{{ $sa_name := printf "%s-sa" $prefix }} +{{ $time_cm := printf "%s-synctime" $prefix }} +{{ $job := printf "%s-job" $prefix }} +{{ $np_name := "pre-junitreporter" }} + +--- +# Permit outbound communication by the Job pod +# (Needed to communicate with the external devops mongodb ) +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: {{ $np_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +spec: + podSelector: + matchLabels: + app: {{ $job }} + egress: + - {} + policyTypes: + - Egress + +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secret }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +stringData: + devops_mongo_uri: "{{ .Values.devops_mongo_uri }}" + +--- +kind: ServiceAccount +apiVersion: v1 +metadata: + name: {{ $sa_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} + +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ $role_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +rules: + - verbs: + - get + - create + - list + apiGroups: + - "" + resources: + - configmaps + +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ $rb_name }} + annotations: + argocd.argoproj.io/sync-wave: "02" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +subjects: + - kind: ServiceAccount + name: {{ $sa_name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ $role_name }} + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $job }} + annotations: + argocd.argoproj.io/sync-wave: "05" + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +spec: + template: + metadata: + labels: + app: {{ $job }} + spec: + containers: + - name: run + image: quay.io/ibmmas/cli:latest + imagePullPolicy: Always + resources: + limits: + cpu: 200m + memory: 512Mi + requests: + cpu: 10m + memory: 64Mi + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: DEVOPS_ENVIRONMENT + value: "{{ .Values.cluster_id }}" + - name: DEVOPS_SUITE_NAME + value: "{{ .Values.reporter_name }}" + - name: DEVOPS_BUILD_NUMBER + value: "{{ .Values.devops_build_number }}" + - name: PRODUCT_ID + value: "ibm-mas-gitops" + - name: GITOPS_VERSION + value: "{{ .Values.gitops_version }}" + - name: SYNC_TIME_CM_NAME + value: {{ $time_cm }} + volumeMounts: + - name: devops-uri + mountPath: /etc/mas/devops-uri + command: + - /bin/bash + - -c + - | + + set -e + trap 'echo "[ERROR] Error occurred at line $LINENO, exited with $?"; exit 1' ERR + + export DEVOPS_MONGO_URI=$(cat /etc/mas/devops-uri/devops_mongo_uri) + export ANSIBLE_DEVOPS_VERSION=$(grep -oP '(?<="version": ")[^"]*' $ANSIBLE_COLLECTIONS_PATH/ibm/mas_devops/MANIFEST.json) # get ibm.mas_devops version from manifest.json + + # Create the configmap with the time via code rather than a resource as we don't want + # a re-sync of a nonsynced app to cause the configmap to be recreated (and thus reset the time). + # It will be the post-sync job that deletes this configmap + CONFIGMAP=$(oc get configmap -n $NAMESPACE | grep $SYNC_TIME_CM_NAME || true) + if [[ -z $CONFIGMAP ]]; then + echo "Creating $SYNC_TIME_CM_NAME configmap" + oc create configmap $SYNC_TIME_CM_NAME --from-literal=sync_start=$(date +%s) + fi + + echo "Run register-start.py" + python3 /opt/app-root/src/register-start.py + + + restartPolicy: Never + serviceAccountName: {{ $sa_name }} + + volumes: + - name: devops-uri + secret: + secretName: {{ $secret }} + defaultMode: 420 + optional: false + backoffLimit: 4 + +{{- end }} \ No newline at end of file diff --git a/sub-charts/junitreporter/templates/10-postsync-report-starter.yaml b/sub-charts/junitreporter/templates/10-postsync-report-starter.yaml new file mode 100644 index 000000000..345e386a6 --- /dev/null +++ b/sub-charts/junitreporter/templates/10-postsync-report-starter.yaml @@ -0,0 +1,193 @@ +{{- if .Values.devops_mongo_uri }} + + +{{ $preprefix := printf "pre-junitreporter-%s" .Values.reporter_name }} +{{ $time_cm := printf "%s-synctime" $preprefix }} + +{{ $prefix := printf "post-junitreporter-%s" .Values.reporter_name }} +{{ $role_name := printf "%s-role" $prefix }} +{{ $rb_name := printf "%s-rb" $prefix }} +{{ $sa_name := printf "%s-sa" $prefix }} +{{ $secret := printf "%s-devopsuri" $prefix }} +{{ $job := printf "%s-job" $prefix }} +{{ $np_name := "post-junitreporter" }} + +--- +# Permit outbound communication by the Job pod +# (Needed to communicate with the external devops mongodb ) +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: {{ $np_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +spec: + podSelector: + matchLabels: + app: {{ $job }} + egress: + - {} + policyTypes: + - Egress + +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secret }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +stringData: + devops_mongo_uri: "{{ .Values.devops_mongo_uri }}" + +--- +kind: ServiceAccount +apiVersion: v1 +metadata: + name: {{ $sa_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} + +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ $role_name }} + annotations: + argocd.argoproj.io/sync-wave: "01" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +rules: + - verbs: + - delete + apiGroups: + - "" + resources: + - configmaps + +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ $rb_name }} + annotations: + argocd.argoproj.io/sync-wave: "02" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +{{- if .Values.custom_labels }} + labels: +{{ .Values.custom_labels | toYaml | indent 4 }} +{{- end }} +subjects: + - kind: ServiceAccount + name: {{ $sa_name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ $role_name }} + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $job }} + annotations: + argocd.argoproj.io/sync-wave: "05" + argocd.argoproj.io/hook: PostSync + argocd.argoproj.io/hook-delete-policy: HookSucceeded,BeforeHookCreation +spec: + template: + metadata: + labels: + app: {{ $job }} + spec: + containers: + - name: run + image: quay.io/ibmmas/cli:latest + imagePullPolicy: Always + resources: + limits: + cpu: 200m + memory: 512Mi + requests: + cpu: 10m + memory: 64Mi + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: DEVOPS_ENVIRONMENT + value: "{{ .Values.cluster_id }}" + - name: DEVOPS_SUITE_NAME + value: "{{ .Values.reporter_name }}" + - name: DEVOPS_BUILD_NUMBER + value: "{{ .Values.devops_build_number }}" + - name: PRODUCT_ID + value: "ibm-mas-gitops" + - name: JUNIT_OUTPUT_DIR + value: "/tmp" + - name: SYNC_START + valueFrom: + configMapKeyRef: + name: {{ $time_cm }} + key: sync_start + - name: SYNC_TIME_CM_NAME + value: {{ $time_cm }} + volumeMounts: + - name: devops-uri + mountPath: /etc/mas/devops-uri + command: + - /bin/bash + - -c + - | + + set -e + trap 'echo "[ERROR] Error occurred at line $LINENO, exited with $?"; exit 1' ERR + + export DEVOPS_MONGO_URI=$(cat /etc/mas/devops-uri/devops_mongo_uri) + # Compute elapsed time between pre-sync and post-sync + CURRENTTIME=$(date +%s) + ELAPSEDTIME=$(($CURRENTTIME-$SYNC_START)) + echo "Elapsed time is ${ELAPSEDTIME}" + + # Create junit xml for one testsuite of the parent argo app, and the testcase of sync + python3 /opt/app-root/src/junit-xml-generator.py --test-suite-name ${DEVOPS_SUITE_NAME} --test-cases Sync:$ELAPSEDTIME --output-dir ${JUNIT_OUTPUT_DIR} + + echo "Run save-junit-to-mongo.py" + python3 /opt/app-root/src/save-junit-to-mongo.py + + echo "Delete $SYNC_TIME_CM_NAME configmap" + oc delete configmap $SYNC_TIME_CM_NAME -n $NAMESPACE + + restartPolicy: Never + serviceAccountName: {{ $sa_name }} + + volumes: + - name: devops-uri + secret: + secretName: {{ $secret }} + defaultMode: 420 + optional: false + backoffLimit: 4 + +{{- end }} \ No newline at end of file diff --git a/sub-charts/junitreporter/values.yaml b/sub-charts/junitreporter/values.yaml new file mode 100644 index 000000000..d08c8f520 --- /dev/null +++ b/sub-charts/junitreporter/values.yaml @@ -0,0 +1,4 @@ +--- +devops_mongo_uri: +reporter_name: +cluster_id: