From 6f529aa0ac6fe44408f30fe612ca83f9a47ce9d0 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Mon, 19 Sep 2022 16:11:41 +0200 Subject: [PATCH] release: get product IDs from Jenkins the JSON object is passed from the Groovy script to the release script, we just need to extract the correct AWS Marketplace product ID based on the "-". Exception for the stable-amd64 where we also need to get the stable-pro product ID. Signed-off-by: Mathieu Tortuyaux --- ci-automation/release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci-automation/release.sh b/ci-automation/release.sh index 6fba16fddb..51bcf3fd99 100644 --- a/ci-automation/release.sh +++ b/ci-automation/release.sh @@ -98,6 +98,14 @@ function _inside_mantle() { rm -rf "${platform}-${arch}" mkdir "${platform}-${arch}" cd "${platform}-${arch}" + + export product="${CHANNEL}-${arch}" + pid=$(jq -r ".[env.product]" ../product-ids.json) + + # If the channel is 'stable' and the arch 'amd64', we add the stable-pro-amd64 product ID to the product IDs. + # The published AMI ID is the same for both offer. + [[ "${CHANNEL}" == "stable" ]] && [[ "${arch}" == "amd64" ]] && pid="${pid},$(jq -r '.["stable-pro-amd64"]' ../product-ids.json)" + plume pre-release --force \ --debug \ --platform="${platform}" \ @@ -114,6 +122,7 @@ function _inside_mantle() { --aws-marketplace-credentials="${aws_marketplace_credentials_file}" \ --publish-marketplace \ --access-role-arn="${AWS_MARKETPLACE_ARN}" \ + --product-ids="${pid}" \ --azure-profile="${azure_profile_config_file}" \ --azure-auth="${azure_auth_config_file}" \ --gce-json-key="${gcp_json_key_path}" \