Skip to content

Commit 2e29b3c

Browse files
committed
ci(v12-pipeline): scope version lookups to product_slug utmstack-v12-dev/utmstack-v12
1 parent 3ec1262 commit 2e29b3c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/v12-deployment-pipeline.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
BRANCH_VERSION=$(echo "${{ github.ref }}" | sed 's|refs/heads/release/||')
4040
echo "Branch version: $BRANCH_VERSION"
4141
42-
RESPONSE=$(curl -s "${CM_URL}/api/v1/versions/latest")
42+
RESPONSE=$(curl -s "${CM_URL}/api/v1/versions/latest?product=utmstack-v12-dev")
4343
LATEST_VERSION=$(echo "$RESPONSE" | jq -r '.version // empty')
4444
echo "Latest version from CM: $LATEST_VERSION"
4545
@@ -537,11 +537,13 @@ jobs:
537537
echo "CM URL: $CM_URL"
538538
echo "Tag: $TAG"
539539
540-
# Select CM_SERVICE_ACCOUNT based on environment
540+
# Select CM_SERVICE_ACCOUNT and product slug based on environment
541541
if [ "$ENVIRONMENT" = "dev" ]; then
542542
cmAuth=$(echo '${{ secrets.CM_SERVICE_ACCOUNT_DEV }}' | jq -r '.')
543+
PRODUCT_SLUG="utmstack-v12-dev"
543544
else
544545
cmAuth=$(echo '${{ secrets.CM_SERVICE_ACCOUNT_PROD }}' | jq -r '.')
546+
PRODUCT_SLUG="utmstack-v12"
545547
fi
546548
547549
id=$(echo "$cmAuth" | jq -r '.id')
@@ -550,7 +552,8 @@ jobs:
550552
body=$(jq -n \
551553
--arg version "$TAG" \
552554
--arg changelog "$changelog" \
553-
'{version: $version, changelog: $changelog}'
555+
--arg product_slug "$PRODUCT_SLUG" \
556+
'{version: $version, changelog: $changelog, product_slug: $product_slug}'
554557
)
555558
556559
response=$(curl -s -X POST "${CM_URL}/api/v1/versions/register" \

0 commit comments

Comments
 (0)