You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor validation script for ai_prod commit tagging checks (#1566)
* Refactor validation script to enable commit tagging checks for ai_prod branch
* Fix image tag format in validation pipeline for consistency
---------
Co-authored-by: rambhatt <rambhatt@microsoft.com>
Copy file name to clipboardExpand all lines: .pipelines/azure_pipeline_validation_appmonitoring_extension.yaml
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -469,23 +469,23 @@ jobs:
469
469
scriptType: bash
470
470
scriptLocation: inlineScript
471
471
inlineScript: |
472
-
# # Check if current commit is tagged and branch is ai_prod
473
-
# CURRENT_BRANCH="$BUILD_SOURCEBRANCHNAME"
474
-
# echo "Current branch is: $CURRENT_BRANCH"
475
-
# if git describe --exact-match --tags >/dev/null 2>&1 && [ "$CURRENT_BRANCH" = "ai_prod" ]; then
476
-
# echo "Current commit is tagged with: $(git describe --exact-match --tags) and branch is ai_prod."
477
-
# else
478
-
# if [ "$CURRENT_BRANCH" != "ai_prod" ]; then
479
-
# echo "Current branch is not ai_prod. Cannot publish from another branch"
480
-
# echo "##vso[task.logissue type=warning]Current branch is not ai_prod. YOU CANNOT RELEASE WITH THIS BUILD."
481
-
# echo "##vso[task.complete result=SucceededWithIssues;]Cannot Publish with a branch other than ai_prod. Exiting...."
482
-
# else
483
-
# echo "Current commit is not tagged."
484
-
# echo "##vso[task.logissue type=warning]Current commit is not tagged. YOU CANNOT RELEASE WITH THIS BUILD and we also cannot publish images without a tagged commit on ai_prod. Please tag this commit with the appropriate semver value and format."
485
-
# echo "##vso[task.complete result=SucceededWithIssues;]Cannot Publish with Untagged Commits. Exiting...."
486
-
# fi
487
-
# exit 0
488
-
# fi
472
+
# Check if current commit is tagged and branch is ai_prod
473
+
CURRENT_BRANCH="$BUILD_SOURCEBRANCHNAME"
474
+
echo "Current branch is: $CURRENT_BRANCH"
475
+
if git describe --exact-match --tags >/dev/null 2>&1 && [ "$CURRENT_BRANCH" = "ai_prod" ]; then
476
+
echo "Current commit is tagged with: $(git describe --exact-match --tags) and branch is ai_prod."
477
+
else
478
+
if [ "$CURRENT_BRANCH" != "ai_prod" ]; then
479
+
echo "Current branch is not ai_prod. Cannot publish from another branch"
480
+
echo "##vso[task.logissue type=warning]Current branch is not ai_prod. YOU CANNOT RELEASE WITH THIS BUILD."
481
+
echo "##vso[task.complete result=SucceededWithIssues;]Cannot Publish with a branch other than ai_prod. Exiting...."
482
+
else
483
+
echo "Current commit is not tagged."
484
+
echo "##vso[task.logissue type=warning]Current commit is not tagged. YOU CANNOT RELEASE WITH THIS BUILD and we also cannot publish images without a tagged commit on ai_prod. Please tag this commit with the appropriate semver value and format."
485
+
echo "##vso[task.complete result=SucceededWithIssues;]Cannot Publish with Untagged Commits. Exiting...."
0 commit comments