From e31b6f82c3880a30b1160fc470b031b8bda47d99 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Tue, 21 Apr 2026 16:30:19 +0530 Subject: [PATCH 01/29] Added param jdbc type to ivt core --- image/cli/masfvt/fvt-manage.yml | 1 + image/cli/masfvt/templates/mas-fvt-manage.yml.j2 | 2 ++ tekton/src/pipelines/mas-fvt-manage.yml.j2 | 5 +++++ tekton/src/tasks/fvt-launcher/mas-launchfvt-manage.yml.j2 | 6 ++++++ tekton/src/tasks/ivt/ivt-core.yml.j2 | 6 ++++++ 5 files changed, 20 insertions(+) diff --git a/image/cli/masfvt/fvt-manage.yml b/image/cli/masfvt/fvt-manage.yml index 3665854bf82..494d2b21e13 100644 --- a/image/cli/masfvt/fvt-manage.yml +++ b/image/cli/masfvt/fvt-manage.yml @@ -31,6 +31,7 @@ ldap_bind_password: "{{ lookup('env', 'LDAP_BIND_PASSWORD') }}" ldap_user_map: "{{ lookup('env', 'LDAP_USER_MAP') }}" ldap_cert_alias: "{{ lookup('env', 'LDAP_CERT_ALIAS') }}" + jdbc_type: "{{ lookup('env', 'JDBC_TYPE') }}" ldap_crt: "{{ lookup('env', 'LDAP_CRT') }}" tasks: - name: "Debug" diff --git a/image/cli/masfvt/templates/mas-fvt-manage.yml.j2 b/image/cli/masfvt/templates/mas-fvt-manage.yml.j2 index 4c8c69e6a0d..2c765ed5073 100644 --- a/image/cli/masfvt/templates/mas-fvt-manage.yml.j2 +++ b/image/cli/masfvt/templates/mas-fvt-manage.yml.j2 @@ -43,6 +43,8 @@ spec: value: "{{ fvt_digest_manage_cypress }}" - name: ivt_digest_core value: "{{ ivt_digest_core }}" + - name: jdbc_type + value: "{{ jdbc_type }}" workspaces: # The generated configuration files diff --git a/tekton/src/pipelines/mas-fvt-manage.yml.j2 b/tekton/src/pipelines/mas-fvt-manage.yml.j2 index d44c705756b..8d557dfb9c6 100644 --- a/tekton/src/pipelines/mas-fvt-manage.yml.j2 +++ b/tekton/src/pipelines/mas-fvt-manage.yml.j2 @@ -62,6 +62,9 @@ spec: - name: ivt_digest_core type: string default: "" + - name: jdbc_type + type: string + default: "" tasks: - name: pipeline-start @@ -122,6 +125,8 @@ spec: value: ibm-mas-manage - name: product_channel value: $(params.mas_app_channel_manage) + - name: jdbc_type + value: $(params.jdbc_type) - name: fvt_test_suite value: coreivt - name: workspace_id diff --git a/tekton/src/tasks/fvt-launcher/mas-launchfvt-manage.yml.j2 b/tekton/src/tasks/fvt-launcher/mas-launchfvt-manage.yml.j2 index 6fffea4e472..8ad0fc356e6 100644 --- a/tekton/src/tasks/fvt-launcher/mas-launchfvt-manage.yml.j2 +++ b/tekton/src/tasks/fvt-launcher/mas-launchfvt-manage.yml.j2 @@ -165,6 +165,12 @@ spec: secretKeyRef: name: mas-fvt-manage key: LDAP_CRT + optional: false + - name: JDBC_TYPE + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: JDBC_TYPE optional: false - name: wait-for-pipelinerun diff --git a/tekton/src/tasks/ivt/ivt-core.yml.j2 b/tekton/src/tasks/ivt/ivt-core.yml.j2 index 314097df7b2..49605c743a2 100644 --- a/tekton/src/tasks/ivt/ivt-core.yml.j2 +++ b/tekton/src/tasks/ivt/ivt-core.yml.j2 @@ -47,6 +47,10 @@ spec: - name: mas_workspace_id type: string description: Workspace ID in MAS to use for running the tests + - name: jdbc_type + type: string + description: JDBC type for database connection + default: "" stepTemplate: name: 'ivt-core' @@ -58,6 +62,8 @@ spec: value: $(params.product_channel) - name: NAMESPACE value: "mas-$(params.mas_instance_id)-core" + - name: JDBC_TYPE + value: $(params.jdbc_type) - name: INSTANCE_ID value: "$(params.mas_instance_id)" - name: WORKSPACE_ID From 03f61c2db25357a9cb11fc89dd76441ac6096460 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Tue, 21 Apr 2026 17:19:32 +0530 Subject: [PATCH 02/29] Updated preparer pipeline --- .../pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 | 5 +++++ tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index 92c5d6a38b7..f056985ce01 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -173,6 +173,9 @@ spec: - name: sls_license_icn type: string - name: smtp_use_sendgrid + - name: jdbc_type + type: string + default: "" type: string default: "" @@ -307,6 +310,8 @@ spec: - name: ldap_basedn value: $(params.ldap_basedn) - name: ldap_userid_map + - name: jdbc_type + value: $(params.jdbc_type) value: $(params.ldap_userid_map) - name: icn diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index d6907fbb98b..c404f46c1ec 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -173,6 +173,9 @@ spec: default: "" - name: ldap_userid_map type: string + - name: jdbc_type + type: string + default: "" default: "" - name: icn @@ -318,6 +321,8 @@ spec: - name: LDAP_USER_MAP value: $(params.ldap_userid_map) - name: LDAP_CERT_ALIAS + - name: JDBC_TYPE + value: $(params.jdbc_type) value: ldap - name: ICN From 34ae108cf9a8c8dcb2cd1c95bf3aad38e23ee145 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Mon, 27 Apr 2026 11:24:20 +0530 Subject: [PATCH 03/29] Corrected pipeline definition --- .../pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 | 4 ++-- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index f056985ce01..6f7c56dbbae 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -173,9 +173,9 @@ spec: - name: sls_license_icn type: string - name: smtp_use_sendgrid - - name: jdbc_type type: string default: "" + - name: jdbc_type type: string default: "" @@ -310,9 +310,9 @@ spec: - name: ldap_basedn value: $(params.ldap_basedn) - name: ldap_userid_map + value: $(params.ldap_userid_map) - name: jdbc_type value: $(params.jdbc_type) - value: $(params.ldap_userid_map) - name: icn value: $(params.sls_license_icn) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index c404f46c1ec..d4f263d43c0 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -173,10 +173,10 @@ spec: default: "" - name: ldap_userid_map type: string + default: "" - name: jdbc_type type: string default: "" - default: "" - name: icn type: string @@ -321,9 +321,9 @@ spec: - name: LDAP_USER_MAP value: $(params.ldap_userid_map) - name: LDAP_CERT_ALIAS + value: ldap - name: JDBC_TYPE value: $(params.jdbc_type) - value: ldap - name: ICN value: $(params.icn) From 1be1b40c9d964a8058102f5a5ff6231201aa5223 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 21 May 2026 16:36:34 +0530 Subject: [PATCH 04/29] Add JDBC_TYPE parameter support to IVT pipeline chain for Manage - Added JDBC_TYPE secret lookup in mas-launchivt-manage task - Added jdbc_type variable to ivt-manage.yml Ansible playbook - Added jdbc_type parameter to mas-ivt-manage.yml.j2 PipelineRun template - Added jdbc_type parameter to mas-ivt-manage pipeline - Passed jdbc_type to ivt-manage task in pipeline - Added jdbc_type parameter and JDBC_TYPE env var to ivt-manage task - Added jdbc_type parameter and JDBC_TYPE env var to ivt-core task This completes the JDBC_TYPE parameter flow for the IVT pipeline chain, allowing test_db2_health.py to access the JDBC_TYPE environment variable. Note: The ansible-fvt repository still needs to be updated to populate the JDBC_TYPE value in the mas-fvt-manage secret. --- image/cli/masfvt/ivt-manage.yml | 2 ++ image/cli/masfvt/templates/mas-ivt-manage.yml.j2 | 4 ++++ tekton/src/pipelines/mas-ivt-manage.yml.j2 | 8 ++++++++ .../src/tasks/fvt-launcher/mas-launchivt-manage.yml.j2 | 6 ++++++ tekton/src/tasks/ivt/ivt-core.yml.j2 | 10 ++++++++++ tekton/src/tasks/ivt/ivt-manage.yml.j2 | 8 ++++++++ 6 files changed, 38 insertions(+) diff --git a/image/cli/masfvt/ivt-manage.yml b/image/cli/masfvt/ivt-manage.yml index bd74dbd20f0..ff371713a3f 100644 --- a/image/cli/masfvt/ivt-manage.yml +++ b/image/cli/masfvt/ivt-manage.yml @@ -31,6 +31,8 @@ ldap_user_map: "{{ lookup('env', 'LDAP_USER_MAP') }}" ldap_cert_alias: "{{ lookup('env', 'LDAP_CERT_ALIAS') }}" ldap_crt: "{{ lookup('env', 'LDAP_CRT') }}" + # JDBC Configuration + jdbc_type: "{{ lookup('env', 'JDBC_TYPE') }}" # Control the Monitor suite based on the presence/absence of Manage fvt_test_suite: "{{ (mas_app_channel_manage == '') | ternary('monitor_fvt', 'monitor_fvt_with_manage') }}" tasks: diff --git a/image/cli/masfvt/templates/mas-ivt-manage.yml.j2 b/image/cli/masfvt/templates/mas-ivt-manage.yml.j2 index 51171ce823b..44744ed7352 100644 --- a/image/cli/masfvt/templates/mas-ivt-manage.yml.j2 +++ b/image/cli/masfvt/templates/mas-ivt-manage.yml.j2 @@ -47,6 +47,10 @@ spec: - name: fvt_digest_ctf value: "{{ fvt_digest_ctf }}" + # JDBC Configuration + - name: jdbc_type + value: "{{ jdbc_type }}" + workspaces: # The generated configuration files - name: shared-configs diff --git a/tekton/src/pipelines/mas-ivt-manage.yml.j2 b/tekton/src/pipelines/mas-ivt-manage.yml.j2 index d5053d57ffa..f6ae1e7c05c 100644 --- a/tekton/src/pipelines/mas-ivt-manage.yml.j2 +++ b/tekton/src/pipelines/mas-ivt-manage.yml.j2 @@ -62,6 +62,12 @@ spec: description: Whether to run the Monitor (Base) [monitor_fvt] or Monitor (with Manage) FVT suite [monitor_fvt_with_manage] default: "monitor_fvt_with_manage" + # JDBC Configuration + - name: jdbc_type + type: string + description: JDBC type for database connection (e.g., incluster_db2, rds-db2, external-db2) + default: "" + tasks: - name: pipeline-start timeout: "0" @@ -105,6 +111,8 @@ spec: value: $(params.mas_app_channel_monitor) - name: fvt_test_suite value: $(params.fvt_test_suite) + - name: jdbc_type + value: $(params.jdbc_type) taskRef: kind: Task name: mas-ivt-manage diff --git a/tekton/src/tasks/fvt-launcher/mas-launchivt-manage.yml.j2 b/tekton/src/tasks/fvt-launcher/mas-launchivt-manage.yml.j2 index 736e26ae805..17bf6d24ede 100644 --- a/tekton/src/tasks/fvt-launcher/mas-launchivt-manage.yml.j2 +++ b/tekton/src/tasks/fvt-launcher/mas-launchivt-manage.yml.j2 @@ -118,6 +118,12 @@ spec: name: mas-fvt-manage key: FVT_WHITELIST_IS optional: false + - name: JDBC_TYPE + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: JDBC_TYPE + optional: true - name: wait-for-pipelinerun image: quay.io/ibmmas/cli:latest diff --git a/tekton/src/tasks/ivt/ivt-core.yml.j2 b/tekton/src/tasks/ivt/ivt-core.yml.j2 index 49605c743a2..c56b5fb2031 100644 --- a/tekton/src/tasks/ivt/ivt-core.yml.j2 +++ b/tekton/src/tasks/ivt/ivt-core.yml.j2 @@ -52,6 +52,12 @@ spec: description: JDBC type for database connection default: "" + # JDBC Configuration + - name: jdbc_type + type: string + description: JDBC type for database connection (e.g., incluster_db2, rds-db2, external-db2) + default: "" + stepTemplate: name: 'ivt-core' env: @@ -103,6 +109,10 @@ spec: key: FVT_GITHUB_TOKEN optional: true + # JDBC Configuration + - name: JDBC_TYPE + value: "$(params.jdbc_type)" + # The name of the test suite inside the container we will execute (/opt/ibm/test/suites/{TEST_SUITE}) - name: TEST_SUITE value: $(params.fvt_test_suite) diff --git a/tekton/src/tasks/ivt/ivt-manage.yml.j2 b/tekton/src/tasks/ivt/ivt-manage.yml.j2 index faa6602e6f1..2f4b7034d58 100644 --- a/tekton/src/tasks/ivt/ivt-manage.yml.j2 +++ b/tekton/src/tasks/ivt/ivt-manage.yml.j2 @@ -69,6 +69,12 @@ spec: type: string default: "" + # JDBC Configuration + - name: jdbc_type + type: string + description: JDBC type for database connection (e.g., incluster_db2, rds-db2, external-db2) + default: "" + stepTemplate: name: 'ivt-manage' env: @@ -107,6 +113,8 @@ spec: optional: true - name: IBMADMIN_ENABLED value: "true" + - name: JDBC_TYPE + value: "$(params.jdbc_type)" volumes: - name: dshm From 7845dd7a4209e330997b2a3bc140275ddc53ccef Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 21 May 2026 17:25:17 +0530 Subject: [PATCH 05/29] removed duplicate param --- tekton/src/tasks/ivt/ivt-core.yml.j2 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tekton/src/tasks/ivt/ivt-core.yml.j2 b/tekton/src/tasks/ivt/ivt-core.yml.j2 index c56b5fb2031..49605c743a2 100644 --- a/tekton/src/tasks/ivt/ivt-core.yml.j2 +++ b/tekton/src/tasks/ivt/ivt-core.yml.j2 @@ -52,12 +52,6 @@ spec: description: JDBC type for database connection default: "" - # JDBC Configuration - - name: jdbc_type - type: string - description: JDBC type for database connection (e.g., incluster_db2, rds-db2, external-db2) - default: "" - stepTemplate: name: 'ivt-core' env: @@ -109,10 +103,6 @@ spec: key: FVT_GITHUB_TOKEN optional: true - # JDBC Configuration - - name: JDBC_TYPE - value: "$(params.jdbc_type)" - # The name of the test suite inside the container we will execute (/opt/ibm/test/suites/{TEST_SUITE}) - name: TEST_SUITE value: $(params.fvt_test_suite) From 97ec56d9155aaad98f8d3e0d8e22f988be2564a9 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Mon, 25 May 2026 21:32:31 +0530 Subject: [PATCH 06/29] updated preparer to update jdbc params in gitops-envs --- .../mascli/functions/gitops_mas_fvt_preparer | 3 + .../gitops-mas-fvt-preparer-pipeline.yml.j2 | 6 + .../gitops/gitops-mas-fvt-preparer.yml.j2 | 168 ++++++++++++++++++ 3 files changed, 177 insertions(+) diff --git a/image/cli/mascli/functions/gitops_mas_fvt_preparer b/image/cli/mascli/functions/gitops_mas_fvt_preparer index 0ed89efec6a..29a4ceca3aa 100644 --- a/image/cli/mascli/functions/gitops_mas_fvt_preparer +++ b/image/cli/mascli/functions/gitops_mas_fvt_preparer @@ -50,6 +50,9 @@ function gitops_mas_fvt_preparer_noninteractive() { [[ -z "$FVT_IMAGE_REGISTRY" ]] && gitops_mas_fvt_preparer_help "FVT_IMAGE_REGISTRY is not set" [[ -z "$FVT_VERSION_CORE" ]] && gitops_mas_fvt_preparer_help "FVT_VERSION_CORE is not set" [[ -z "$IVT_VERSION_CORE" ]] && gitops_mas_fvt_preparer_help "IVT_VERSION_CORE is not set" + + # Export ENABLE_TRANSITION_TESTING with default value + export ENABLE_TRANSITION_TESTING=${ENABLE_TRANSITION_TESTING:-false} } function gitops_mas_fvt_preparer() { diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index 3391a9a5952..79381007633 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -181,6 +181,10 @@ spec: - name: jdbc_type type: string default: "" + - name: enable_transition_testing + type: string + default: "false" + description: "Enable post-IVT transition testing for JDBC configuration changes" tasks: - name: mas-launchfvt @@ -316,6 +320,8 @@ spec: value: $(params.ldap_userid_map) - name: jdbc_type value: $(params.jdbc_type) + - name: enable_transition_testing + value: $(params.enable_transition_testing) - name: icn value: $(params.sls_license_icn) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index d8d2a4ae805..f1bb46f62ed 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -177,6 +177,10 @@ spec: - name: jdbc_type type: string default: "" + - name: enable_transition_testing + type: string + default: "false" + description: "Enable post-IVT transition testing for JDBC configuration changes" - name: icn type: string @@ -327,6 +331,8 @@ spec: value: ldap - name: JDBC_TYPE value: $(params.jdbc_type) + - name: ENABLE_TRANSITION_TESTING + value: $(params.enable_transition_testing) - name: ICN value: $(params.icn) @@ -433,6 +439,111 @@ spec: fi echo "SendGrid subuser ${SENDGRID_SUBUSER_USERNAME} disabled successfully!" echo "It is now safe to run tests against the environment; the suite is no longer capable of sending emails for real." + + # Post-IVT Transition Testing Functions + # ========================================================================= + update_jdbc_configs_for_transition() { + echo "=== Updating JDBC Configuration for Transition Testing ===" + + # Clone gitops-envs repository + cd /tmp + rm -rf gitops-envs + git clone https://${GITOPS_GITHUB_PAT}@${GITOPS_GITHUB_HOST}/${GITOPS_GITHUB_ORG}/${GITOPS_GITHUB_REPO}.git + cd gitops-envs + + # Define file paths + SUITE_CONFIG="${ACCOUNT_ID}/${CLUSTER_NAME}/${MAS_INSTANCE_ID}/ibm-mas-suite-configs.yaml" + DB_CONFIG="${ACCOUNT_ID}/${CLUSTER_NAME}/${MAS_INSTANCE_ID}/ibm-db2u-databases.yaml" + + echo "Updating jdbc_type in ${SUITE_CONFIG}" + if [ -f "$SUITE_CONFIG" ]; then + yq eval '.spec.config.jdbc_type = "incluster-db2"' -i "$SUITE_CONFIG" + echo "✓ Updated jdbc_type to 'incluster-db2'" + else + echo "WARNING: ${SUITE_CONFIG} not found" + fi + + echo "Updating DB2 heap sizes in ${DB_CONFIG}" + if [ -f "$DB_CONFIG" ]; then + yq eval '.spec.config.DB2_FMP_COMM_HEAPSZ = "8192"' -i "$DB_CONFIG" + yq eval '.spec.config.APPLHEAPSZ = "2048"' -i "$DB_CONFIG" + echo "✓ Updated DB2_FMP_COMM_HEAPSZ to 8192" + echo "✓ Updated APPLHEAPSZ to 2048" + else + echo "WARNING: ${DB_CONFIG} not found" + fi + + # Commit and push changes + git add "$SUITE_CONFIG" "$DB_CONFIG" + git commit -m "Post-IVT transition: Update JDBC config for testing - Build ${DEVOPS_BUILD_NUMBER}" + git push origin master + + echo "✓ GitOps configuration updated successfully" + } + + run_post_transition_ivt_test() { + echo "=== Running Post-Transition IVT Test ===" + + # Get the IVT image digest + IVT_DIGEST=$(oc get secret mas-fvt-manage -n mas-${MAS_INSTANCE_ID}-pipelines -o jsonpath='{.data.IVT_DIGEST_CORE}' | base64 -d) + FVT_IMAGE="${FVT_IMAGE_REGISTRY}/mas-devops/ivt-core@${IVT_DIGEST}" + + echo "Running test_db2_health.py with TEST_PHASE=post-transition" + + # Create a temporary pod to run the test + cat < Date: Mon, 25 May 2026 21:49:30 +0530 Subject: [PATCH 07/29] fixed syntax --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index f1bb46f62ed..8c5786be1fa 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -522,7 +522,7 @@ spec: key: DEVOPS_MONGO_URI optional: true EOF - + # Wait for pod to complete echo "Waiting for post-transition test to complete..." oc wait --for=condition=Ready pod/post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --timeout=300s || true @@ -544,7 +544,6 @@ EOF # Cleanup oc delete pod post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --ignore-not-found=true } - } export ARTIFACTORY_TOKEN=${FVT_ARTIFACTORY_TOKEN} export ARTIFACTORY_UPLOAD_DIR=${ARTIFACTORY_GENERIC_LOGS_URL}/mas-fvt/${MAS_INSTANCE_ID}/${DEVOPS_BUILD_NUMBER} From ac7fdd81bb5b0b288990d97d9ac6857a87d3b84f Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Mon, 25 May 2026 22:04:04 +0530 Subject: [PATCH 08/29] create pod using oc command instead of cat --- .../gitops/gitops-mas-fvt-preparer.yml.j2 | 50 ++++++------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 8c5786be1fa..4a91aecf3eb 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -490,38 +490,18 @@ spec: echo "Running test_db2_health.py with TEST_PHASE=post-transition" - # Create a temporary pod to run the test - cat < Date: Mon, 25 May 2026 22:15:42 +0530 Subject: [PATCH 09/29] Ran detect secrets --- .secrets.baseline | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.secrets.baseline b/.secrets.baseline index d609ed18005..207b93db739 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-20T23:47:35Z", + "generated_at": "2026-05-25T16:44:45Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -914,6 +914,16 @@ "type": "Base64 High Entropy String", "verified_result": null } + ], + "tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2": [ + { + "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", + "is_secret": false, + "is_verified": false, + "line_number": 499, + "type": "Base64 High Entropy String", + "verified_result": null + } ] }, "version": "0.13.1+ibm.64.dss", From e3eebea7f741c0b6a346be20506c93f3f4545148 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 27 May 2026 00:01:19 +0530 Subject: [PATCH 10/29] Updated value of APPLHEAPSZ --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 4a91aecf3eb..9e2704c940e 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -466,9 +466,9 @@ spec: echo "Updating DB2 heap sizes in ${DB_CONFIG}" if [ -f "$DB_CONFIG" ]; then yq eval '.spec.config.DB2_FMP_COMM_HEAPSZ = "8192"' -i "$DB_CONFIG" - yq eval '.spec.config.APPLHEAPSZ = "2048"' -i "$DB_CONFIG" + yq eval '.spec.config.APPLHEAPSZ = "2048 Automatic"' -i "$DB_CONFIG" echo "✓ Updated DB2_FMP_COMM_HEAPSZ to 8192" - echo "✓ Updated APPLHEAPSZ to 2048" + echo "✓ Updated APPLHEAPSZ to '2048 Automatic'" else echo "WARNING: ${DB_CONFIG} not found" fi From fcc5d9b831b3ac974680915f2d2aa2a19df75093 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 27 May 2026 01:12:30 +0530 Subject: [PATCH 11/29] corrected syntax --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 9e2704c940e..7e6f5ba9791 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -439,6 +439,7 @@ spec: fi echo "SendGrid subuser ${SENDGRID_SUBUSER_USERNAME} disabled successfully!" echo "It is now safe to run tests against the environment; the suite is no longer capable of sending emails for real." + } # Post-IVT Transition Testing Functions # ========================================================================= From 1eb61e599c821a5bbdbdf40d26aa1f7827ccff19 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 27 May 2026 01:20:06 +0530 Subject: [PATCH 12/29] updated .secrets.baseline --- .secrets.baseline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 207b93db739..a85ae964fe6 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-25T16:44:45Z", + "generated_at": "2026-05-26T19:49:10Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -920,7 +920,7 @@ "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", "is_secret": false, "is_verified": false, - "line_number": 499, + "line_number": 500, "type": "Base64 High Entropy String", "verified_result": null } From 287027b37bd2b99d71ae4d5e193cdbe094154380 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 27 May 2026 19:52:02 +0530 Subject: [PATCH 13/29] added gitops-envs in git clone --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 7e6f5ba9791..cd991acd03c 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -449,7 +449,7 @@ spec: # Clone gitops-envs repository cd /tmp rm -rf gitops-envs - git clone https://${GITOPS_GITHUB_PAT}@${GITOPS_GITHUB_HOST}/${GITOPS_GITHUB_ORG}/${GITOPS_GITHUB_REPO}.git + git clone https://${GITOPS_GITHUB_PAT}@${GITOPS_GITHUB_HOST}/${GITOPS_GITHUB_ORG}/gitops-envs.git cd gitops-envs # Define file paths From 1510d3f6f01d03af475d8b8d9771dfbef87c4497 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 27 May 2026 21:34:33 +0530 Subject: [PATCH 14/29] added required params for preparer --- .secrets.baseline | 4 +- .../gitops-mas-fvt-preparer-pipeline.yml.j2 | 15 +++++ .../gitops/gitops-mas-fvt-preparer.yml.j2 | 56 +++++++++++++++++-- 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index a85ae964fe6..f198a9f0d3d 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-26T19:49:10Z", + "generated_at": "2026-05-27T16:03:22Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -920,7 +920,7 @@ "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", "is_secret": false, "is_verified": false, - "line_number": 500, + "line_number": 546, "type": "Base64 High Entropy String", "verified_result": null } diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index 79381007633..fa812529c9d 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -185,6 +185,15 @@ spec: type: string default: "false" description: "Enable post-IVT transition testing for JDBC configuration changes" + - name: github_host + type: string + default: "github.ibm.com" + - name: github_org + type: string + default: "maximoappsuite" + - name: github_pat + type: string + default: "" tasks: - name: mas-launchfvt @@ -322,6 +331,12 @@ spec: value: $(params.jdbc_type) - name: enable_transition_testing value: $(params.enable_transition_testing) + - name: github_host + value: $(params.github_host) + - name: github_org + value: $(params.github_org) + - name: github_pat + value: $(params.github_pat) - name: icn value: $(params.sls_license_icn) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index cd991acd03c..cf0cf4c08a3 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -181,6 +181,15 @@ spec: type: string default: "false" description: "Enable post-IVT transition testing for JDBC configuration changes" + - name: github_host + type: string + default: "github.ibm.com" + - name: github_org + type: string + default: "maximoappsuite" + - name: github_pat + type: string + default: "" - name: icn type: string @@ -333,6 +342,12 @@ spec: value: $(params.jdbc_type) - name: ENABLE_TRANSITION_TESTING value: $(params.enable_transition_testing) + - name: GITHUB_HOST + value: $(params.github_host) + - name: GITHUB_ORG + value: $(params.github_org) + - name: GITHUB_PAT + value: $(params.github_pat) - name: ICN value: $(params.icn) @@ -446,11 +461,32 @@ spec: update_jdbc_configs_for_transition() { echo "=== Updating JDBC Configuration for Transition Testing ===" + # Validate required variables + if [ -z "${GITHUB_HOST}" ] || [ -z "${GITHUB_ORG}" ] || [ -z "${GITHUB_PAT}" ]; then + echo "ERROR: GitHub credentials not set (GITHUB_HOST, GITHUB_ORG, GITHUB_PAT)" + return 1 + fi + + if [ -z "${ACCOUNT_ID}" ] || [ -z "${CLUSTER_NAME}" ] || [ -z "${MAS_INSTANCE_ID}" ]; then + echo "ERROR: Required environment variables not set (ACCOUNT_ID, CLUSTER_NAME, MAS_INSTANCE_ID)" + return 1 + fi + # Clone gitops-envs repository - cd /tmp + cd /tmp || return 1 rm -rf gitops-envs - git clone https://${GITOPS_GITHUB_PAT}@${GITOPS_GITHUB_HOST}/${GITOPS_GITHUB_ORG}/gitops-envs.git - cd gitops-envs + + echo "Cloning gitops-envs repository from ${GITHUB_HOST}/${GITHUB_ORG}" + if ! git clone https://git:${GITHUB_PAT}@${GITHUB_HOST}/${GITHUB_ORG}/gitops-envs.git; then + echo "ERROR: Failed to clone gitops-envs repository" + return 1 + fi + + cd gitops-envs || return 1 + + # Configure git user + git config user.email "masdevops@ibm.com" + git config user.name "MAS DevOps" # Define file paths SUITE_CONFIG="${ACCOUNT_ID}/${CLUSTER_NAME}/${MAS_INSTANCE_ID}/ibm-mas-suite-configs.yaml" @@ -462,6 +498,7 @@ spec: echo "✓ Updated jdbc_type to 'incluster-db2'" else echo "WARNING: ${SUITE_CONFIG} not found" + return 1 fi echo "Updating DB2 heap sizes in ${DB_CONFIG}" @@ -472,14 +509,23 @@ spec: echo "✓ Updated APPLHEAPSZ to '2048 Automatic'" else echo "WARNING: ${DB_CONFIG} not found" + return 1 fi # Commit and push changes git add "$SUITE_CONFIG" "$DB_CONFIG" - git commit -m "Post-IVT transition: Update JDBC config for testing - Build ${DEVOPS_BUILD_NUMBER}" - git push origin master + if ! git commit -m "Post-IVT transition: Update JDBC config for testing - Build ${DEVOPS_BUILD_NUMBER}"; then + echo "ERROR: Failed to commit changes" + return 1 + fi + + if ! git push origin master; then + echo "ERROR: Failed to push changes to gitops-envs" + return 1 + fi echo "✓ GitOps configuration updated successfully" + return 0 } run_post_transition_ivt_test() { From 56b2c6abb266553c6046e53671742f07e766cbed Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 28 May 2026 01:21:42 +0530 Subject: [PATCH 15/29] Removed GITHUB_PAT from params --- .secrets.baseline | 4 ++-- .../pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 | 5 ----- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index f198a9f0d3d..e746b80be78 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-27T16:03:22Z", + "generated_at": "2026-05-27T19:51:04Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -920,7 +920,7 @@ "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", "is_secret": false, "is_verified": false, - "line_number": 546, + "line_number": 541, "type": "Base64 High Entropy String", "verified_result": null } diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index fa812529c9d..02bd4f2f82e 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -191,9 +191,6 @@ spec: - name: github_org type: string default: "maximoappsuite" - - name: github_pat - type: string - default: "" tasks: - name: mas-launchfvt @@ -335,8 +332,6 @@ spec: value: $(params.github_host) - name: github_org value: $(params.github_org) - - name: github_pat - value: $(params.github_pat) - name: icn value: $(params.sls_license_icn) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index cf0cf4c08a3..dac87f8222e 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -187,9 +187,6 @@ spec: - name: github_org type: string default: "maximoappsuite" - - name: github_pat - type: string - default: "" - name: icn type: string @@ -346,8 +343,6 @@ spec: value: $(params.github_host) - name: GITHUB_ORG value: $(params.github_org) - - name: GITHUB_PAT - value: $(params.github_pat) - name: ICN value: $(params.icn) From 0169203fea81e6ce71c0d478c654eac4bb04cbe5 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 28 May 2026 03:46:01 +0530 Subject: [PATCH 16/29] updated function --- .../gitops/gitops-mas-fvt-preparer.yml.j2 | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index dac87f8222e..200fef46a6a 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -489,7 +489,8 @@ spec: echo "Updating jdbc_type in ${SUITE_CONFIG}" if [ -f "$SUITE_CONFIG" ]; then - yq eval '.spec.config.jdbc_type = "incluster-db2"' -i "$SUITE_CONFIG" + # Update jdbc_type + yq eval '(.ibm_mas_suite_configs[] | select(.mas_config_kind == "jdbccfgs") | .jdbc_type) = "incluster-db2"' -i "$SUITE_CONFIG" echo "✓ Updated jdbc_type to 'incluster-db2'" else echo "WARNING: ${SUITE_CONFIG} not found" @@ -498,10 +499,11 @@ spec: echo "Updating DB2 heap sizes in ${DB_CONFIG}" if [ -f "$DB_CONFIG" ]; then - yq eval '.spec.config.DB2_FMP_COMM_HEAPSZ = "8192"' -i "$DB_CONFIG" - yq eval '.spec.config.APPLHEAPSZ = "2048 Automatic"' -i "$DB_CONFIG" - echo "✓ Updated DB2_FMP_COMM_HEAPSZ to 8192" - echo "✓ Updated APPLHEAPSZ to '2048 Automatic'" + DB2_INSTANCE="db2wh-${MAS_INSTANCE_ID}-manage" + yq eval "(.ibm_db2u_databases[] | select(.db2_instance_name == \"${DB2_INSTANCE}\") | .db2_instance_registry.DB2_FMP_COMM_HEAPSZ) = \"8192\"" -i "$DB_CONFIG" + yq eval "(.ibm_db2u_databases[] | select(.db2_instance_name == \"${DB2_INSTANCE}\") | .db2_database_db_config.APPLHEAPSZ) = \"2048 AUTOMATIC\"" -i "$DB_CONFIG" + echo "✓ Updated DB2_FMP_COMM_HEAPSZ to 8192 for ${DB2_INSTANCE}" + echo "✓ Updated APPLHEAPSZ to '2048 AUTOMATIC' for ${DB2_INSTANCE}" else echo "WARNING: ${DB_CONFIG} not found" return 1 @@ -923,15 +925,20 @@ spec: # Step 4: Trigger ArgoCD sync for affected applications echo "Step 4: Triggering ArgoCD sync for affected applications..." + + # Construct JDBC config app name: ${MAS_INSTANCE_ID}-jdbc-wsapp-${MAS_WORKSPACE_ID}-manage.${MAS_INSTANCE_ID} + JDBC_CONFIG_APP="${MAS_INSTANCE_ID}-jdbc-wsapp-${MAS_WORKSPACE_ID}-manage.${MAS_INSTANCE_ID}" + DB2_DB_APP="db2-db.${CLUSTER_NAME}.${MAS_INSTANCE_ID}.manage" + argocd app sync "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" --grpc-web || echo "Warning: suite app sync failed" - argocd app sync "${MAS_INSTANCE_ID}-jdbc-system.${CLUSTER_NAME}" --grpc-web || echo "Warning: jdbc-system app sync failed" - argocd app sync "${MAS_INSTANCE_ID}-db2u-system.${CLUSTER_NAME}" --grpc-web || echo "Warning: db2u-system app sync failed" + argocd app sync "${JDBC_CONFIG_APP}" --grpc-web || echo "Warning: JDBC config app sync failed" + argocd app sync "${DB2_DB_APP}" --grpc-web || echo "Warning: DB2 database app sync failed" # Step 5: Wait for applications to be healthy echo "Step 5: Waiting for applications to sync and become healthy..." check_argo_app_synced "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" - check_argo_app_synced "${MAS_INSTANCE_ID}-jdbc-system.${CLUSTER_NAME}" - check_argo_app_synced "${MAS_INSTANCE_ID}-db2u-system.${CLUSTER_NAME}" + check_argo_app_synced "${JDBC_CONFIG_APP}" + check_argo_app_synced "${DB2_DB_APP}" echo "✓ All applications synced successfully" From 6de30cdcdb17e1cd1ee0aaabdb9078ea670ced11 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 28 May 2026 13:56:32 +0530 Subject: [PATCH 17/29] updated .secrets.baseline --- .secrets.baseline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index e746b80be78..812d86b526c 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-27T19:51:04Z", + "generated_at": "2026-05-28T08:25:46Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -920,7 +920,7 @@ "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", "is_secret": false, "is_verified": false, - "line_number": 541, + "line_number": 543, "type": "Base64 High Entropy String", "verified_result": null } From 2c53368a9a0df8115c7ba16a72d1ee04d3a8627c Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 29 May 2026 00:59:11 +0530 Subject: [PATCH 18/29] removed jdbc app sync --- .secrets.baseline | 2 +- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 812d86b526c..179caf3efc3 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-28T08:25:46Z", + "generated_at": "2026-05-28T19:28:18Z", "plugins_used": [ { "name": "AWSKeyDetector" diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 200fef46a6a..3d19c2889c7 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -926,18 +926,15 @@ spec: # Step 4: Trigger ArgoCD sync for affected applications echo "Step 4: Triggering ArgoCD sync for affected applications..." - # Construct JDBC config app name: ${MAS_INSTANCE_ID}-jdbc-wsapp-${MAS_WORKSPACE_ID}-manage.${MAS_INSTANCE_ID} - JDBC_CONFIG_APP="${MAS_INSTANCE_ID}-jdbc-wsapp-${MAS_WORKSPACE_ID}-manage.${MAS_INSTANCE_ID}" + # Note: We only sync DB2 app; its postsync job will handle JDBC config update DB2_DB_APP="db2-db.${CLUSTER_NAME}.${MAS_INSTANCE_ID}.manage" argocd app sync "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" --grpc-web || echo "Warning: suite app sync failed" - argocd app sync "${JDBC_CONFIG_APP}" --grpc-web || echo "Warning: JDBC config app sync failed" argocd app sync "${DB2_DB_APP}" --grpc-web || echo "Warning: DB2 database app sync failed" # Step 5: Wait for applications to be healthy echo "Step 5: Waiting for applications to sync and become healthy..." check_argo_app_synced "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" - check_argo_app_synced "${JDBC_CONFIG_APP}" check_argo_app_synced "${DB2_DB_APP}" echo "✓ All applications synced successfully" From 8cf107fad7789088468d9ee0c684b6afc7472560 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 29 May 2026 13:14:55 +0530 Subject: [PATCH 19/29] modified test --- .../gitops-mas-fvt-preparer-pipeline.yml.j2 | 18 +++++++++++ .../gitops/gitops-mas-fvt-preparer.yml.j2 | 30 ++++++++++++++++--- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 index 02bd4f2f82e..627edff6e13 100644 --- a/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-mas-fvt-preparer-pipeline.yml.j2 @@ -185,6 +185,18 @@ spec: type: string default: "false" description: "Enable post-IVT transition testing for JDBC configuration changes" + - name: mas_edition + type: string + default: "" + description: "Current MAS edition (from mas_instance.edition)" + - name: transition_from_edition + type: string + default: "" + description: "Source edition for transition testing (from transition_tests.from_edition)" + - name: transition_to_edition + type: string + default: "" + description: "Target edition for transition testing (from transition_tests.to_edition)" - name: github_host type: string default: "github.ibm.com" @@ -328,6 +340,12 @@ spec: value: $(params.jdbc_type) - name: enable_transition_testing value: $(params.enable_transition_testing) + - name: mas_edition + value: $(params.mas_edition) + - name: transition_from_edition + value: $(params.transition_from_edition) + - name: transition_to_edition + value: $(params.transition_to_edition) - name: github_host value: $(params.github_host) - name: github_org diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 3d19c2889c7..c319d2bd15e 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -181,6 +181,18 @@ spec: type: string default: "false" description: "Enable post-IVT transition testing for JDBC configuration changes" + - name: mas_edition + type: string + default: "" + description: "Current MAS edition (from mas_instance.edition)" + - name: transition_from_edition + type: string + default: "" + description: "Source edition for transition testing (from transition_tests.from_edition)" + - name: transition_to_edition + type: string + default: "" + description: "Target edition for transition testing (from transition_tests.to_edition)" - name: github_host type: string default: "github.ibm.com" @@ -339,6 +351,12 @@ spec: value: $(params.jdbc_type) - name: ENABLE_TRANSITION_TESTING value: $(params.enable_transition_testing) + - name: MAS_EDITION + value: $(params.mas_edition) + - name: TRANSITION_FROM_EDITION + value: $(params.transition_from_edition) + - name: TRANSITION_TO_EDITION + value: $(params.transition_to_edition) - name: GITHUB_HOST value: $(params.github_host) - name: GITHUB_ORG @@ -896,14 +914,19 @@ spec: mas gitops-mas-fvt-preparer --pipeline-storage-class ${PIPELINE_STORAGE_CLASS} || exit 1 # Wait for launcher to complete + /opt/app-root/src/wait-for-tekton.sh --type pipelinerun --max-retries 100 --name $MAS_INSTANCE_ID-fvt-$DEVOPS_BUILD_NUMBER-$LAUNCHER_ID --namespace mas-$MAS_INSTANCE_ID-pipelines # Post-IVT Transition Testing # ========================================================================= - # This section runs AFTER the FVT pipeline completes (which includes IVT-Manage with test_db2_health.py FIRST RUN) - # It updates JDBC configs, syncs ArgoCD, and re-runs the test to validate the transition - if [[ "$LAUNCHER_ID" == "core" && "${ENABLE_TRANSITION_TESTING:-false}" == "true" ]]; then + # This section runs AFTER the FVT-Apps pipeline completes (which includes IVT-Manage with test_db2_health suite FIRST RUN) + # It updates JDBC configs to simulate the jdbc_type change, syncs ArgoCD, and re-runs test_db2_health suite to validate + # Only runs when: launcher is apps, transition testing is enabled, AND current edition matches FROM edition + # After this test passes, transition_test.make_transition() will update GitOps to deploy the TO edition + # The next rollout will deploy the TO edition and IVT-Manage will run again (THIRD RUN) with the new edition + if [[ "$LAUNCHER_ID" == "apps" && "${ENABLE_TRANSITION_TESTING:-false}" == "true" && "${MAS_EDITION}" == "${TRANSITION_FROM_EDITION}" ]]; then echo "==========================================" echo "Starting Post-IVT Transition Testing" + echo "Current Edition: ${MAS_EDITION}, From Edition: ${TRANSITION_FROM_EDITION}, Target Edition: ${TRANSITION_TO_EDITION}" echo "==========================================" # Step 1: Update GitOps configurations @@ -955,7 +978,6 @@ spec: else echo "Post-IVT transition testing is disabled (LAUNCHER_ID=$LAUNCHER_ID, ENABLE_TRANSITION_TESTING=${ENABLE_TRANSITION_TESTING:-false})" fi - /opt/app-root/src/wait-for-tekton.sh --type pipelinerun --max-retries 100 --name $MAS_INSTANCE_ID-fvt-$DEVOPS_BUILD_NUMBER-$LAUNCHER_ID --namespace mas-$MAS_INSTANCE_ID-pipelines # Remove argocd window argocd_login From 4b5ed31365c683b0ea22eb15e789d32c3d04027b Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 29 May 2026 13:17:51 +0530 Subject: [PATCH 20/29] updated .secrets.baseline --- .secrets.baseline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 179caf3efc3..399a7eefadc 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-28T19:28:18Z", + "generated_at": "2026-05-29T07:47:09Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -920,7 +920,7 @@ "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", "is_secret": false, "is_verified": false, - "line_number": 543, + "line_number": 561, "type": "Base64 High Entropy String", "verified_result": null } From e3a255c4cb88feef67b9ed3081b44fd839dbd24e Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 29 May 2026 21:53:58 +0530 Subject: [PATCH 21/29] Updated jdbc_type --- .secrets.baseline | 2 +- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 399a7eefadc..e923b9857ff 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-29T07:47:09Z", + "generated_at": "2026-05-29T16:23:08Z", "plugins_used": [ { "name": "AWSKeyDetector" diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index c319d2bd15e..fa1c6e7b17e 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -508,8 +508,8 @@ spec: echo "Updating jdbc_type in ${SUITE_CONFIG}" if [ -f "$SUITE_CONFIG" ]; then # Update jdbc_type - yq eval '(.ibm_mas_suite_configs[] | select(.mas_config_kind == "jdbccfgs") | .jdbc_type) = "incluster-db2"' -i "$SUITE_CONFIG" - echo "✓ Updated jdbc_type to 'incluster-db2'" + yq eval '(.ibm_mas_suite_configs[] | select(.mas_config_kind == "jdbccfgs") | .jdbc_type) = "external-db2"' -i "$SUITE_CONFIG" + echo "✓ Updated jdbc_type to 'external-db2'" else echo "WARNING: ${SUITE_CONFIG} not found" return 1 From f80b42fe1c08370240966bd6d6584f881430d178 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 29 May 2026 23:24:19 +0530 Subject: [PATCH 22/29] added timeout & out of sync condition --- .secrets.baseline | 2 +- .../gitops/gitops-mas-fvt-preparer.yml.j2 | 51 +++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index e923b9857ff..0f247c40986 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-29T16:23:08Z", + "generated_at": "2026-05-29T17:53:46Z", "plugins_used": [ { "name": "AWSKeyDetector" diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index fa1c6e7b17e..c6d19f3a3c6 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -587,10 +587,55 @@ spec: oc delete pod post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --ignore-not-found=true } + check_argo_app_synced_with_timeout() { + # Enhanced version of check_argo_app_synced with timeout and postsync job handling + # Args: $1 = app_name, $2 = max_retries (optional, default 20) + local APP_NAME=$1 + local MAX_RETRIES=${2:-20} + local RETRY_COUNT=0 + local WAIT_TIME=30 + + echo "argo:check_argo_app_synced_with_timeout : Checking sync status for ${APP_NAME} (max retries: ${MAX_RETRIES})" + + while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do + SYNC_STATUS=$(argocd app get ${APP_NAME} --grpc-web -o json | jq -r '.status.sync.status') + HEALTH_STATUS=$(argocd app get ${APP_NAME} --grpc-web -o json | jq -r '.status.health.status') + PHASE=$(argocd app get ${APP_NAME} --grpc-web -o json | jq -r '.status.operationState.phase // "N/A"') + + echo "argo:check_argo_app_synced_with_timeout : SYNC_STATUS=${SYNC_STATUS} HEALTH_STATUS=${HEALTH_STATUS} PHASE=${PHASE}" + + # Success conditions: + # 1. Synced and Healthy + # 2. OutOfSync but Phase=Succeeded and Health=Healthy (postsync job completed and deleted) + if [[ "${SYNC_STATUS}" == "Synced" && "${HEALTH_STATUS}" == "Healthy" ]]; then + echo "✓ Application ${APP_NAME} is Synced and Healthy" + return 0 + elif [[ "${SYNC_STATUS}" == "OutOfSync" && "${PHASE}" == "Succeeded" && "${HEALTH_STATUS}" == "Healthy" ]]; then + echo "✓ Application ${APP_NAME} sync completed successfully (postsync job cleaned up)" + return 0 + fi + + # Failure conditions + if [[ "${HEALTH_STATUS}" == "Degraded" || "${PHASE}" == "Failed" || "${PHASE}" == "Error" ]]; then + echo "✗ Application ${APP_NAME} is in a failed state: HEALTH=${HEALTH_STATUS}, PHASE=${PHASE}" + return 1 + fi + + RETRY_COUNT=$((RETRY_COUNT + 1)) + if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then + echo "argo:check_argo_app_synced_with_timeout : Waiting ${WAIT_TIME}s before checking again (attempt ${RETRY_COUNT}/${MAX_RETRIES})" + sleep ${WAIT_TIME} + fi + done + + echo "✗ Timeout: Application ${APP_NAME} did not reach desired state after ${MAX_RETRIES} retries" + return 1 + } + export ARTIFACTORY_TOKEN=${FVT_ARTIFACTORY_TOKEN} export ARTIFACTORY_UPLOAD_DIR=${ARTIFACTORY_GENERIC_LOGS_URL}/mas-fvt/${MAS_INSTANCE_ID}/${DEVOPS_BUILD_NUMBER} - CLI_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + CLI_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" . $CLI_DIR/functions/gitops_utils ROSA_CONFIG=/workspace/configs/tmp-rosa/rosa-$(params.cluster_name)-details.yaml @@ -957,8 +1002,8 @@ spec: # Step 5: Wait for applications to be healthy echo "Step 5: Waiting for applications to sync and become healthy..." - check_argo_app_synced "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" - check_argo_app_synced "${DB2_DB_APP}" + check_argo_app_synced_with_timeout "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" 20 + check_argo_app_synced_with_timeout "${DB2_DB_APP}" 20 echo "✓ All applications synced successfully" From dd5cce66ce1d6ef672220bb38237a13793b9b8e3 Mon Sep 17 00:00:00 2001 From: Nivedithaa Mahendran Date: Wed, 3 Jun 2026 01:14:03 +0530 Subject: [PATCH 23/29] update sync for app with label --- image/cli/mascli/functions/gitops_utils | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/image/cli/mascli/functions/gitops_utils b/image/cli/mascli/functions/gitops_utils index 84497e97392..e699e824136 100644 --- a/image/cli/mascli/functions/gitops_utils +++ b/image/cli/mascli/functions/gitops_utils @@ -1273,11 +1273,20 @@ function argocd_login() { function argocd_sync(){ APP_NAME=$1 + SYNC_MODE=${2:-app} # Default to 'app' mode, can be 'label' + echo - echo "Force Application $APP_NAME to Sync ..." - argocd app sync $APP_NAME --timeout 30 --assumeYes --grpc-web - RC=$? - echo "ArgoCD response for Force Application $APP_NAME to Sync: $RC" + if [[ "$SYNC_MODE" == "label" ]]; then + echo "Force Applications with label app.kubernetes.io/instance=$APP_NAME to Sync ..." + argocd app list -l app.kubernetes.io/instance=$APP_NAME -o name | xargs -n1 argocd app sync --timeout 30 --assumeYes --grpc-web || true + RC=$? + echo "ArgoCD response for Force Applications with label to Sync: $RC" + else + echo "Force Application $APP_NAME to Sync ..." + argocd app sync $APP_NAME --timeout 30 --assumeYes --grpc-web + RC=$? + echo "ArgoCD response for Force Application $APP_NAME to Sync: $RC" + fi } function argocd_prune_sync(){ @@ -1341,8 +1350,9 @@ function check_argo_app_synced() { APPLICATION=$1 CLUSTER_WATCHER=$2 NAMESPACE=$3 + SYNC_MODE=${4:-app} # Default to 'app' mode, can be 'label' COUNT=0 - echo "argo:check_argo_app_synced : APPLICATION=$APPLICATION CLUSTER_WATCHER=$CLUSTER_WATCHER NAMESPACE=$NAMESPACE" + echo "argo:check_argo_app_synced : APPLICATION=$APPLICATION CLUSTER_WATCHER=$CLUSTER_WATCHER NAMESPACE=$NAMESPACE SYNC_MODE=$SYNC_MODE" while true; do echo "argo:check_argo_app_synced : Checking sync status for $APPLICATION" APP_RES_YAML=$(argocd app get $APPLICATION -o json 2> /dev/null) @@ -1360,9 +1370,9 @@ function check_argo_app_synced() { echo "argo:check_argo_app_synced : Sync Status is $SYNC_STATUS, Phase is ${PHASE}. Waiting 30s before checking status and phase again - $COUNT" if ! (( $COUNT % 5 )) ; then if [[ -n "$CLUSTER_WATCHER" ]]; then - argocd_sync $CLUSTER_WATCHER + argocd_sync $CLUSTER_WATCHER "$SYNC_MODE" fi - argocd_sync $APPLICATION + argocd_sync $APPLICATION "$SYNC_MODE" fi sleep 30 fi From 4c56d613bb29614cd0a3dce1e47b9af8d98fe2fd Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 3 Jun 2026 02:28:16 +0530 Subject: [PATCH 24/29] timeout & jdbc credentials changes --- image/cli/mascli/functions/gitops_mas_config | 2 +- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/image/cli/mascli/functions/gitops_mas_config b/image/cli/mascli/functions/gitops_mas_config index 7235a4b2a80..58d8118c737 100644 --- a/image/cli/mascli/functions/gitops_mas_config +++ b/image/cli/mascli/functions/gitops_mas_config @@ -982,7 +982,7 @@ function gitops_mas_config() { fi echo_reset_dim "JDBC_CREDENTIALS_SECRET_ID ................ ${COLOR_MAGENTA}$JDBC_CREDENTIALS_SECRET_ID" - if [ "${JDBC_TYPE}" == "incluster-db2" ]; then + if [ "${JDBC_TYPE}" == "incluster-db2" ] || [ "${JDBC_TYPE}" == "external-db2" ]; then # Create a secret in SM containing the username/password for this specific DB2 database instance. # A presync hook on the jdbccfg chart will take care of ensuring the user added to the database's LDAP registry export DB2_SECRET_FILE=$TEMP_DIR/db2-secret.json diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index c6d19f3a3c6..8f897c87e3d 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -1002,8 +1002,8 @@ spec: # Step 5: Wait for applications to be healthy echo "Step 5: Waiting for applications to sync and become healthy..." - check_argo_app_synced_with_timeout "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" 20 - check_argo_app_synced_with_timeout "${DB2_DB_APP}" 20 + check_argo_app_synced_with_timeout "suite.${CLUSTER_NAME}.${MAS_INSTANCE_ID}" 30 + check_argo_app_synced_with_timeout "${DB2_DB_APP}" 30 echo "✓ All applications synced successfully" @@ -1045,7 +1045,7 @@ spec: # wait for the root apps to sync to make sure the setting has been applied everywhere check_argo_app_synced "${ACCOUNT_ROOT_APP}" check_argo_app_synced "${CLUSTER_ROOT_APP}" - check_argo_app_synced "${INSTANCE_ROOT_APP}" + check_argo_app_synced_with_timeout "${INSTANCE_ROOT_APP}" 120 if [[ "${USE_SENDGRID}" == "true" ]]; then disable_subuser From 79b937fde3a0688866c61e9d09ddfb0d6c0df176 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 3 Jun 2026 16:59:10 +0530 Subject: [PATCH 25/29] Updated preparer --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 8f897c87e3d..423ecd4784b 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -557,13 +557,7 @@ spec: --image=${FVT_IMAGE} \ --restart=Never \ --namespace=mas-${MAS_INSTANCE_ID}-pipelines \ - --env="TEST_PHASE=post-transition" \ - --env="JDBC_TYPE=incluster-db2" \ - --env="INSTANCE_ID=${MAS_INSTANCE_ID}" \ - --env="PRODUCT_ID=ibm-mas-manage" \ - --env="WORKSPACE_ID=${MAS_WORKSPACE_ID}" \ - --env="BUILD_NUM=${DEVOPS_BUILD_NUMBER}" \ - --overrides="{\"spec\":{\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test/src && export TEST_PHASE=post-transition && export JDBC_TYPE=incluster-db2 && export INSTANCE_ID=${MAS_INSTANCE_ID} && export PRODUCT_ID=ibm-mas-manage && export WORKSPACE_ID=${MAS_WORKSPACE_ID} && export BUILD_NUM=${DEVOPS_BUILD_NUMBER} && pytest -v test_db2_health.py --junitxml=/tmp/post-transition-results.xml\"],\"env\":[{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" + --overrides="{\"spec\":{\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test/src && pytest -v test_db2_health.py --junitxml=/tmp/post-transition-results.xml\"],\"env\":[{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-manage\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" # Wait for pod to complete echo "Waiting for post-transition test to complete..." From 1e80675833bcb3cc1cdb136ea7121f0a5c9137ac Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 3 Jun 2026 17:06:59 +0530 Subject: [PATCH 26/29] updated .secrets.baseline --- .secrets.baseline | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 046523544a3..863c59631f7 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-29T17:53:46Z", + "generated_at": "2026-06-03T11:36:14Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -924,16 +924,6 @@ "type": "Base64 High Entropy String", "verified_result": null } - ], - "tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2": [ - { - "hashed_secret": "282db52cffa0e6a89ac34921d87d138ac00fba71", - "is_secret": false, - "is_verified": false, - "line_number": 561, - "type": "Base64 High Entropy String", - "verified_result": null - } ] }, "version": "0.13.1+ibm.64.dss", From 34c4e3e8b8bcece25f9c0200590d4a6b33bd416b Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Wed, 3 Jun 2026 22:46:12 +0530 Subject: [PATCH 27/29] added serviceaccount to pod --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 423ecd4784b..7965e346e6c 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -557,7 +557,7 @@ spec: --image=${FVT_IMAGE} \ --restart=Never \ --namespace=mas-${MAS_INSTANCE_ID}-pipelines \ - --overrides="{\"spec\":{\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test/src && pytest -v test_db2_health.py --junitxml=/tmp/post-transition-results.xml\"],\"env\":[{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-manage\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" + --overrides="{\"spec\":{\"serviceAccountName\":\"pipeline\",\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test/src && pytest -v test_db2_health.py --junitxml=/tmp/post-transition-results.xml\"],\"env\":[{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-manage\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" # Wait for pod to complete echo "Waiting for post-transition test to complete..." From 38af752f8c7ba8bff4e7348dec56c5c877f18a4a Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Thu, 4 Jun 2026 02:31:22 +0530 Subject: [PATCH 28/29] added and executed test suite --- tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index 7965e346e6c..0f84bf91ec5 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -553,11 +553,12 @@ spec: echo "Running test_db2_health.py with TEST_PHASE=post-transition" # Create a temporary pod to run the test using oc run + # Uses the IVT-Core framework with coreivt test suite oc run post-transition-ivt-${DEVOPS_BUILD_NUMBER} \ --image=${FVT_IMAGE} \ --restart=Never \ --namespace=mas-${MAS_INSTANCE_ID}-pipelines \ - --overrides="{\"spec\":{\"serviceAccountName\":\"pipeline\",\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test/src && pytest -v test_db2_health.py --junitxml=/tmp/post-transition-results.xml\"],\"env\":[{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-manage\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" + --overrides="{\"spec\":{\"serviceAccountName\":\"pipeline\",\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test && PYTEST_ARGS='--junitxml=/tmp/post-transition-ivt-results.xml' ./run-test-suite.sh\"],\"env\":[{\"name\":\"TEST_SUITE\",\"value\":\"coreivt\"},{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-core\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" # Wait for pod to complete echo "Waiting for post-transition test to complete..." From 7eef8c8319c8d926791dc4304cbdd6672a5e7352 Mon Sep 17 00:00:00 2001 From: Darshan Pandya Date: Fri, 5 Jun 2026 21:55:58 +0530 Subject: [PATCH 29/29] updated test pod spec --- .../gitops/gitops-mas-fvt-preparer.yml.j2 | 44 +++++++++++++++---- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 index b6acdf99ef2..9c0893e8de8 100644 --- a/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-mas-fvt-preparer.yml.j2 @@ -551,31 +551,59 @@ spec: FVT_IMAGE="${FVT_IMAGE_REGISTRY}/mas-devops/ivt-core@${IVT_DIGEST}" echo "Running test_db2_health.py with TEST_PHASE=post-transition" + echo "Image: ${FVT_IMAGE}" - # Create a temporary pod to run the test using oc run - # Uses the IVT-Core framework with coreivt test suite + # Create pod using oc run with proper overrides + # Key: Do NOT override command/args - let container's default CMD run + # The container's CMD runs /opt/ibm/test/src/pytest_runner.sh which handles test execution oc run post-transition-ivt-${DEVOPS_BUILD_NUMBER} \ --image=${FVT_IMAGE} \ --restart=Never \ --namespace=mas-${MAS_INSTANCE_ID}-pipelines \ - --overrides="{\"spec\":{\"serviceAccountName\":\"pipeline\",\"containers\":[{\"name\":\"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\",\"image\":\"${FVT_IMAGE}\",\"command\":[\"/bin/bash\",\"-c\"],\"args\":[\"cd /opt/ibm/test && PYTEST_ARGS='--junitxml=/tmp/post-transition-ivt-results.xml' ./run-test-suite.sh\"],\"env\":[{\"name\":\"TEST_SUITE\",\"value\":\"coreivt\"},{\"name\":\"TEST_PHASE\",\"value\":\"post-transition\"},{\"name\":\"JDBC_TYPE\",\"value\":\"external-db2\"},{\"name\":\"INSTANCE_ID\",\"value\":\"${MAS_INSTANCE_ID}\"},{\"name\":\"NAMESPACE\",\"value\":\"mas-${MAS_INSTANCE_ID}-core\"},{\"name\":\"PRODUCT_ID\",\"value\":\"ibm-mas-manage\"},{\"name\":\"WORKSPACE_ID\",\"value\":\"${MAS_WORKSPACE_ID}\"},{\"name\":\"BUILD_NUM\",\"value\":\"${DEVOPS_BUILD_NUMBER}\"},{\"name\":\"DEVOPS_MONGO_URI\",\"valueFrom\":{\"secretKeyRef\":{\"name\":\"mas-devops\",\"key\":\"DEVOPS_MONGO_URI\",\"optional\":true}}}]}]}}" + --overrides="{ + \"spec\": { + \"serviceAccountName\": \"pipeline\", + \"containers\": [{ + \"name\": \"post-transition-ivt-${DEVOPS_BUILD_NUMBER}\", + \"image\": \"${FVT_IMAGE}\", + \"imagePullPolicy\": \"IfNotPresent\", + \"workingDir\": \"/opt/ibm/test/src\", + \"env\": [ + {\"name\": \"TEST_SUITE\", \"value\": \"coreivt\"}, + {\"name\": \"TEST_PHASE\", \"value\": \"post-transition\"}, + {\"name\": \"JDBC_TYPE\", \"value\": \"external-db2\"}, + {\"name\": \"INSTANCE_ID\", \"value\": \"${MAS_INSTANCE_ID}\"}, + {\"name\": \"WORKSPACE_ID\", \"value\": \"${MAS_WORKSPACE_ID}\"}, + {\"name\": \"NAMESPACE\", \"value\": \"mas-${MAS_INSTANCE_ID}-core\"}, + {\"name\": \"PRODUCT_ID\", \"value\": \"ibm-mas-manage\"}, + {\"name\": \"PRODUCT_CHANNEL\", \"value\": \"${MAS_APP_CHANNEL_MANAGE}\"}, + {\"name\": \"BUILD_NUM\", \"value\": \"${DEVOPS_BUILD_NUMBER}\"}, + {\"name\": \"FVT_ENABLE_DEBUG\", \"value\": \"true\"}, + {\"name\": \"DEVOPS_MONGO_URI\", \"valueFrom\": {\"secretKeyRef\": {\"name\": \"mas-devops\", \"key\": \"DEVOPS_MONGO_URI\", \"optional\": true}}} + ], + \"volumeMounts\": [{\"mountPath\": \"/dev/shm\", \"name\": \"dshm\"}], + \"resources\": {} + }], + \"volumes\": [{\"name\": \"dshm\", \"emptyDir\": {\"medium\": \"Memory\"}}] + } + }" # Wait for pod to complete echo "Waiting for post-transition test to complete..." oc wait --for=condition=Ready pod/post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --timeout=300s || true - oc wait --for=jsonpath='{.status.phase}'=Succeeded pod/post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --timeout=600s || true + oc wait --for=jsonpath='{.status.phase}'=Succeeded pod/post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines --timeout=1800s || true # Get test results echo "Retrieving test results..." - oc logs post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines + oc logs post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines || echo "Failed to retrieve logs" # Check if test passed POD_STATUS=$(oc get pod post-transition-ivt-${DEVOPS_BUILD_NUMBER} -n mas-${MAS_INSTANCE_ID}-pipelines -o jsonpath='{.status.phase}') if [ "$POD_STATUS" == "Succeeded" ]; then - echo "✓ Post-transition IVT test completed successfully" + echo "✓ Post-transition IVT test completed successfully" else - echo "✗ Post-transition IVT test failed" - exit 1 + echo "✗ Post-transition IVT test failed with status: $POD_STATUS" + exit 1 fi # Cleanup