From bf3e46da32f56caf972d681a00e579f90868703e Mon Sep 17 00:00:00 2001 From: Dennis Behm Date: Tue, 4 Aug 2026 20:03:00 +0200 Subject: [PATCH 1/3] store copy of evidence file for MCP tooling (#409) Signed-off-by: Dennis Behm --- Templates/Common-Backend-Scripts/README.md | 2 ++ .../pipelineBackend.config | 5 ++++ .../wazideploy-deploy.sh | 28 +++++++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Templates/Common-Backend-Scripts/README.md b/Templates/Common-Backend-Scripts/README.md index 5c56d633..94a70614 100644 --- a/Templates/Common-Backend-Scripts/README.md +++ b/Templates/Common-Backend-Scripts/README.md @@ -861,6 +861,8 @@ This script invokes the Wazi Deploy Deploy (with the Python Translator) command If the `publish` parameter defined in the pipelineBackend.config file is set to true, the script checks for the package input file that was automatically retrieved from wazideploy-generate.sh. +If the optional `wdSharedEvidencesPath` setting is configured in `pipelineBackend.config`, a timestamped copy of the evidence file is stored centrally after a successful deployment. This is intended for use with IBM Developer for z/OS on VS Code MCP tooling to enable Wazi Deploy analytics. + #### Invocation The `wazideploy-deploy.sh` script can be invoked as follows: diff --git a/Templates/Common-Backend-Scripts/pipelineBackend.config b/Templates/Common-Backend-Scripts/pipelineBackend.config index 25700bb2..d695afc3 100644 --- a/Templates/Common-Backend-Scripts/pipelineBackend.config +++ b/Templates/Common-Backend-Scripts/pipelineBackend.config @@ -328,6 +328,11 @@ wdReportRenderer="wd-full-report-renderer.html" # default: wdOutputFile="deploy/deployment-report.html" wdOutputFile="deploy/deployment-report.html" +# +# (Optional) Create a copy of Wazi Deploy evidence files centrally for +# IBM Developer for z/OS on VS Code MCP Tools -> Wazi Deploy analytics +wdSharedEvidencesPath=/u/gitlabr/wd_evidences + # # # Method to specify the work directory for Wazi Deploy diff --git a/Templates/Common-Backend-Scripts/wazideploy-deploy.sh b/Templates/Common-Backend-Scripts/wazideploy-deploy.sh index f58db9ef..223bb0ea 100755 --- a/Templates/Common-Backend-Scripts/wazideploy-deploy.sh +++ b/Templates/Common-Backend-Scripts/wazideploy-deploy.sh @@ -29,6 +29,7 @@ # 2023/10/19 MDLB 1.00 Initial Release # 2023/11/29 DB 1.10 Fixes to relative workspace directory # 2025/06/25 DB 1.20 Accept extraVars + pass default variables to WD +# 2026/08/04 DB 1.30 Store copy of evidence file for IDZ on VS Code MCP tooling #=================================================================================== Help() { echo $PGM" - Deploy a package with Wazi Deploy " @@ -114,7 +115,7 @@ pipelineConfiguration="${SCRIPT_HOME}/pipelineBackend.config" #export BASH_XTRACEFD=1 # Write set -x trace to file descriptor PGM=$(basename "$0") -PGMVERS="1.20" +PGMVERS="1.30" USER=$(whoami) SYS=$(uname -Ia) @@ -129,6 +130,7 @@ Debug="" App="" # passed via argument a extraVars="" # passed via argument x extraOptions="" # passed via argument o +wdSharedEvidencesLocation="" HELP=$1 if [ "$HELP" = "?" ]; then @@ -374,6 +376,19 @@ validateOptions() { EvidenceFile="$(wdDeployPackageDir)/${EvidenceFile}" fi fi + + # verify shared evidences path configuration + if [ ! -z "${wdSharedEvidencesPath}" ]; then + if [ ! -d "${wdSharedEvidencesPath}" ]; then + rc=8 + ERRMSG=$PGM": [ERROR] Path for shared Wazi Deploy Evidences (${wdSharedEvidencesPath}) was not found. rc="$rc + echo $ERRMSG + else + timestamp=$(date +"%Y-%m-%d_%H-%M-%S") + wdSharedEvidencesLocation=${wdSharedEvidencesPath}/${App}/deploy_${timestamp}.yaml + mkdir -p $wdSharedEvidencesLocation + fi + fi } # When publishing is enabled, check if the tarfile exists in the expected location @@ -419,7 +434,9 @@ if [ $rc -eq 0 ]; then if [ ! -z "${EvidenceFile}" ]; then echo $PGM": [INFO] ** Evidence File:" ${EvidenceFile} fi - + if [ ! -z "${wdSharedEvidencesLocation}" ]; then + echo $PGM": [INFO] **. Shared Evidences Path:" ${wdSharedEvidencesPath} + fi if [ ! -z "${Debug}" ]; then echo $PGM": [INFO] ** Debug output is enabled." else @@ -470,6 +487,13 @@ if [ $rc -eq 0 ]; then $CommandLine 2>&1 rc=$? + echo $PGM": Wazi Deploy completed with rc="$rc + + if [ -f ${EvidenceFile} ] && [ ! -z ${wdSharedEvidencesLocation} ]; then + echo $PGM": Copy ${EvidenceFile} to ${wdSharedEvidencesLocation}" + cp ${EvidenceFile} ${wdSharedEvidencesLocation} + fi + if [ $rc -ne 0 ]; then ERRMSG=$PGM": [ERROR] Unable to Deploy package with Wazi Deploy. rc="$rc echo $ERRMSG From 323eed139a2cc5c77d23b8d9a7e02fe1ec9690a4 Mon Sep 17 00:00:00 2001 From: Dennis Behm Date: Tue, 4 Aug 2026 20:07:06 +0200 Subject: [PATCH 2/3] Remove sample configuration Signed-off-by: Dennis Behm --- Templates/Common-Backend-Scripts/pipelineBackend.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Templates/Common-Backend-Scripts/pipelineBackend.config b/Templates/Common-Backend-Scripts/pipelineBackend.config index d695afc3..3e3959b0 100644 --- a/Templates/Common-Backend-Scripts/pipelineBackend.config +++ b/Templates/Common-Backend-Scripts/pipelineBackend.config @@ -331,7 +331,9 @@ wdOutputFile="deploy/deployment-report.html" # # (Optional) Create a copy of Wazi Deploy evidence files centrally for # IBM Developer for z/OS on VS Code MCP Tools -> Wazi Deploy analytics -wdSharedEvidencesPath=/u/gitlabr/wd_evidences +# sample: wdSharedEvidencesPath="/u/gitlabr/wd_evidences" +# default: wdSharedEvidencesPath="" +wdSharedEvidencesPath="" # # From 1017c3fd2491582d7954636d245563786de821ad Mon Sep 17 00:00:00 2001 From: Dennis Behm Date: Fri, 7 Aug 2026 12:38:40 +0200 Subject: [PATCH 3/3] Address reviewers comments Signed-off-by: Dennis Behm --- Templates/Common-Backend-Scripts/wazideploy-deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/Common-Backend-Scripts/wazideploy-deploy.sh b/Templates/Common-Backend-Scripts/wazideploy-deploy.sh index 223bb0ea..9e823100 100755 --- a/Templates/Common-Backend-Scripts/wazideploy-deploy.sh +++ b/Templates/Common-Backend-Scripts/wazideploy-deploy.sh @@ -384,8 +384,8 @@ validateOptions() { ERRMSG=$PGM": [ERROR] Path for shared Wazi Deploy Evidences (${wdSharedEvidencesPath}) was not found. rc="$rc echo $ERRMSG else - timestamp=$(date +"%Y-%m-%d_%H-%M-%S") - wdSharedEvidencesLocation=${wdSharedEvidencesPath}/${App}/deploy_${timestamp}.yaml + timestamp=$(date +"%Y%m%d_%H-%M-%S") + wdSharedEvidencesLocation=${wdSharedEvidencesPath}/${App}/deploy_${timestamp} mkdir -p $wdSharedEvidencesLocation fi fi