diff --git a/tekton/src/params/install.yml.j2 b/tekton/src/params/install.yml.j2 index 1e4b38e948..f1ab2df7ab 100644 --- a/tekton/src/params/install.yml.j2 +++ b/tekton/src/params/install.yml.j2 @@ -280,6 +280,10 @@ type: string description: COS action to be performed (provision or deprovision) default: "" +- name: use_hmac + type: string + description: Optional boolean variable weather hmac is enabled or not + default: "" # MAS Integration - Grafana # ----------------------------------------------------------------------------- diff --git a/tekton/src/pipelines/fvt-deprovision-after.yml.j2 b/tekton/src/pipelines/fvt-deprovision-after.yml.j2 index f1565af8d7..aaef845847 100644 --- a/tekton/src/pipelines/fvt-deprovision-after.yml.j2 +++ b/tekton/src/pipelines/fvt-deprovision-after.yml.j2 @@ -53,6 +53,9 @@ spec: - name: cos_action type: string default: "" + - name: use_hmac + type: string + default: "" # IBM Event Streams - name: eventstreams_resourcegroup diff --git a/tekton/src/pipelines/gitops/deprovision-mas-deps.yml.j2 b/tekton/src/pipelines/gitops/deprovision-mas-deps.yml.j2 index 0ec1d13f9a..78502072fd 100644 --- a/tekton/src/pipelines/gitops/deprovision-mas-deps.yml.j2 +++ b/tekton/src/pipelines/gitops/deprovision-mas-deps.yml.j2 @@ -84,6 +84,9 @@ spec: - name: ibmcloud_apikey type: string default: "" + - name: use_hmac + type: string + default: "" tasks: {% if wait_for_deprovision == true %} @@ -198,6 +201,8 @@ spec: value: $(params.ibmcloud_resourcegroup) - name: ibmcloud_apikey value: $(params.ibmcloud_apikey) + - name: use_hmac + value: $(params.use_hmac) workspaces: - name: configs diff --git a/tekton/src/pipelines/gitops/gitops-mas-deps.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-deps.yml.j2 index 1744047d1c..aeb42d11c9 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-deps.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-deps.yml.j2 @@ -85,6 +85,10 @@ spec: type: string description: COS action to be performed (provision or deprovision) default: "" + - name: use_hmac + type: string + description: Optional boolean variable weather hmac is enabled or not + default: "" - name: ibmcloud_apikey type: string @@ -214,6 +218,8 @@ spec: value: $(params.ibmcloud_resourcegroup) - name: ibmcloud_apikey value: $(params.ibmcloud_apikey) + - name: use_hmac + value: $(params.use_hmac) workspaces: - name: configs diff --git a/tekton/src/pipelines/install.yml.j2 b/tekton/src/pipelines/install.yml.j2 index 605f762ce0..f2d711fb6a 100644 --- a/tekton/src/pipelines/install.yml.j2 +++ b/tekton/src/pipelines/install.yml.j2 @@ -161,10 +161,14 @@ spec: # 4. Other Dependecies # ------------------------------------------------------------------------- # 4.1 Install Cloud Object Storage (COS) - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/cos.yml.j2') | indent(4) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/cos.yml.j2', template_vars={'suffix': 'system'}) | indent(4) }} runAfter: - pre-install-check + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/cos.yml.j2', template_vars={'suffix': 'manage'}) | indent(4) }} + runAfter: + - suite-verify + # 4.2 Configure COS in MAS {{ lookup('template', pipeline_src_dir ~ '/taskdefs/core/suite-config-cos.yml.j2') | indent(4) }} runAfter: diff --git a/tekton/src/pipelines/taskdefs/dependencies/cos.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/cos.yml.j2 index 5933a13b7f..e419ea9619 100644 --- a/tekton/src/pipelines/taskdefs/dependencies/cos.yml.j2 +++ b/tekton/src/pipelines/taskdefs/dependencies/cos.yml.j2 @@ -1,9 +1,9 @@ -- name: cos +- name: cos-{{ suffix }} timeout: "0" params: {{ lookup('template', pipeline_src_dir ~ '/taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: dependencies-cos + value: dependencies-cos-{{ suffix }} - name: mas_instance_id value: $(params.mas_instance_id) @@ -21,6 +21,20 @@ - name: custom_labels value: $(params.custom_labels) + +{% if suffix == "system" %} + - name: mas_config_scope + value: system + - name: use_hmac + value: false +{% endif %} +{% if suffix == "manage" %} + - name: mas_config_scope + value: wsapp + - name: use_hmac + value: true +{% endif %} + taskRef: kind: Task name: mas-devops-cos diff --git a/tekton/src/tasks/dependencies/cos.yml.j2 b/tekton/src/tasks/dependencies/cos.yml.j2 index cd2d782836..66a50145c2 100644 --- a/tekton/src/tasks/dependencies/cos.yml.j2 +++ b/tekton/src/tasks/dependencies/cos.yml.j2 @@ -43,6 +43,10 @@ spec: type: string description: Name of COS instance in IBM Cloud account default: "" + - name: use_hmac + type: string + description: Optional boolean variable weather hmac is enabled or not + default: "" stepTemplate: @@ -72,6 +76,8 @@ spec: value: $(params.cos_resourcegroup) - name: IBMCLOUD_RESOURCEGROUP value: $(params.ibmcloud_resourcegroup) + - name: USE_HMAC + value: $(params.use_hmac) steps: - name: cos command: diff --git a/tekton/src/tasks/gitops/gitops-cos.yml.j2 b/tekton/src/tasks/gitops/gitops-cos.yml.j2 index 2c06076f57..476571f61a 100644 --- a/tekton/src/tasks/gitops/gitops-cos.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-cos.yml.j2 @@ -32,6 +32,8 @@ spec: type: string - name: ibmcloud_apikey type: string + - name: use_hmac + type: string stepTemplate: name: gitops-cos @@ -62,6 +64,8 @@ spec: value: $(params.ibmcloud_resourcegroup) - name: IBMCLOUD_APIKEY value: $(params.ibmcloud_apikey) + - name: USE_HMAC + value: $(params.use_hmac) steps: - args: - |- diff --git a/tekton/src/tasks/gitops/gitops-deprovision-cos.yml.j2 b/tekton/src/tasks/gitops/gitops-deprovision-cos.yml.j2 index 7fb8eb90f3..58d4cfb32c 100644 --- a/tekton/src/tasks/gitops/gitops-deprovision-cos.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-deprovision-cos.yml.j2 @@ -37,6 +37,8 @@ spec: type: string - name: ibmcloud_apikey type: string + - name: use_hmac + type: string stepTemplate: name: gitops-deprovision-cos @@ -75,6 +77,8 @@ spec: value: $(params.ibmcloud_resourcegroup) - name: IBMCLOUD_APIKEY value: $(params.ibmcloud_apikey) + - name: USE_HMAC + value: $(params.use_hmac) steps: - args: - |-