From 42d478a9123231c97ab119daf75fe9959933d821 Mon Sep 17 00:00:00 2001 From: Andrew Whitfield Date: Wed, 26 Feb 2025 13:01:58 +0000 Subject: [PATCH] [patch] Run watsonstudio cfg even if cp4d not installed locally for gitops (#1467) --- image/cli/mascli/functions/gitops_mas_config | 2 + .../pipelines/gitops/gitops-mas-apps.yml.j2 | 46 +++++++++++++++++-- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/image/cli/mascli/functions/gitops_mas_config b/image/cli/mascli/functions/gitops_mas_config index 01cb58e6e9..bd8ef8e19a 100644 --- a/image/cli/mascli/functions/gitops_mas_config +++ b/image/cli/mascli/functions/gitops_mas_config @@ -823,11 +823,13 @@ function gitops_mas_config() { # Source: gitops_suite_watson_studio_config # --------------------------------------------------------------------------- if [ "${MAS_CONFIG_TYPE}" == "watsonstudio" ]; then + sm_login # Secrets are stored in SM in the cp4d-service function that installs wsl export WATSON_STUDIO_SECRET=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}${MAS_INSTANCE_ID}${SECRETS_KEY_SEPERATOR}wsl-cp4d export SECRET_KEY_WATSON_STUDIO_USERNAME=${WATSON_STUDIO_SECRET}#username export SECRET_KEY_WATSON_STUDIO_PASSWORD=${WATSON_STUDIO_SECRET}#password export SECRET_KEY_WATSON_STUDIO_URL=${WATSON_STUDIO_SECRET}#url + sm_verify_secret_exists $WATSON_STUDIO_SECRET "username,password,url" fi echo diff --git a/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 index 317bb6f435..e4f3452d34 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2 @@ -1265,8 +1265,6 @@ spec: value: predict - name: mas_workspace_id value: $(params.mas_workspace_id) - - name: mas_config_scope - value: wsapp taskRef: kind: Task @@ -1275,9 +1273,6 @@ spec: - input: "$(params.mas_app_channel_predict)" operator: notin values: [""] - - input: "$(params.cp4d_wsl_action)" - operator: in - values: ["install"] workspaces: - name: configs @@ -1962,6 +1957,47 @@ spec: operator: in values: ["standard", "premium"] + # 7.4 IoT JDBC Config + - name: gitops-delete-jdbc-config-iot + runAfter: + - gitops-deprovision-db2u-database-iot + params: + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/gitops-params.yml.j2') | indent(8) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/secrets-params.yml.j2') | indent(8) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/git-params.yml.j2') | indent(8) }} + + - name: mas_instance_id + value: $(params.mas_instance_id) + - name: mas_app_id + value: iot + - name: mas_config_scope + value: system + - name: mas_workspace_id + value: $(params.mas_workspace_id) + - name: jdbc_type + value: $(params.jdbc_type_iot) + - name: jdbc_instance_name + value: $(params.jdbc_instance_name_iot) + - name: jdbc_connection_url + value: $(params.jdbc_connection_url_iot) + - name: jdbc_certificate_file + value: $(params.jdbc_certificate_file_iot) + - name: jdbc_route + value: $(params.jdbc_route_iot) + workspaces: + - name: configs + workspace: configs + taskRef: + kind: Task + name: gitops-delete-jdbc-config + when: + - input: "$(params.mas_app_channel_iot)" + operator: in + values: [""] + - input: "$(params.mas_edition)" + operator: in + values: ["essentials-maintenance", "standard", "premium"] + # 8. Deprovision Kafka config # ------------------------------------------------------------------------- - name: gitops-delete-kafka-config