om stage-product cannot find product without build version for certain releases.
search cancel

om stage-product cannot find product without build version for certain releases.

book

Article ID: 423597

calendar_today

Updated On:

Products

VMware Tanzu Application Service Concourse for VMware Tanzu

Issue/Introduction

Concourse platform automation for Tanzu fails to stage a product with error such as: 

% om --env env.yml stage-product --product-name p-healthwatch --product-version 2.3.4 

2025/12/23 13:46:17 failed to stage product: cannot find product p-healthwatch 2.3.4

Ops Manager UI shows version in format such as 2.3.4-build.124 (including build in version number rather than just 2.3.4).

This problem may occur with Healthwatch, Apps Metrics, and other products where tile author used this format for product_version.

Resolution

The product_version needs to be obtained by running om product-metadata command against the *.pivotal file for the release.

 om product-metadata  --product-path ~/healthwatch-2.3.4.pivotal --product-version 
2.3.4-build.7

The Tanzu Platform Automation reference tasks have logic to obtain product version from the release metadata in .pivotal file : https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/platform-automation-toolkit-for-tanzu/5-2/vmware-automation-toolkit/docs-tasks.html#upload-and-stage-product

We recommend using an environment variable obtained from command like below when running om stage-product. 

product_version="$(om product-metadata \ --product-path product/*.pivotal \ --product-version)"

Then use that variable when executing om stage-product CLI command. 

om --env env/"${ENV_FILE}" stage-product \ --product-name "${product_name}" \ --product-version "${product_version}"

Using this logic will avoid any errors due to version inconsistencies in tile metadata.

 

Reference task for upload-and-stage-product:

cat /var/version && echo ""
set -eux

if [ -z "${CONFIG_FILE}" ]; then
  om --env env/"${ENV_FILE}" upload-product \
    --product product/*.pivotal
else
  om --env env/"${ENV_FILE}" upload-product \
    --product product/*.pivotal --config "config/${CONFIG_FILE}"
fi

product_name="$(om product-metadata \
  --product-path product/*.pivotal \
  --product-name)"
product_version="$(om product-metadata \
  --product-path product/*.pivotal \
  --product-version)"

om --env env/"${ENV_FILE}" stage-product \
  --product-name "${product_name}" \
  --product-version "${product_version}"