Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"name": "AGENT_IMAGE_FULL_PATH",
"value": "__ACR_NAME__/public/azuremonitor/containerinsights/__AGENT_RELEASE__:__AGENT_RELEASE____AGENT_IMAGE_TAG_SUFFIX__"
"value": "public/azuremonitor/containerinsights/__AGENT_RELEASE__:__AGENT_RELEASE____AGENT_IMAGE_TAG_SUFFIX__"
},
{
"name": "CDPX_REGISTRY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"name": "AGENT_IMAGE_FULL_PATH",
"value": "__ACR_NAME__/public/azuremonitor/containerinsights/__AGENT_RELEASE__:win-__AGENT_RELEASE____AGENT_IMAGE_TAG_SUFFIX__"
"value": "public/azuremonitor/containerinsights/__AGENT_RELEASE__:win-__AGENT_RELEASE____AGENT_IMAGE_TAG_SUFFIX__"
},
{
"name": "CDPX_REGISTRY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ if [ -z $AGENT_IMAGE_TAG_SUFFIX ]; then
exit 1
fi

#Make sure that tag being pushed will not overwrite an existing tag in mcr
MCR_TAG_RESULT="`wget -qO- https://mcr.microsoft.com/v2/azuremonitor/containerinsights/ciprod/tags/list`"
if [ $? -ne 0 ]; then
echo "-e error unable to get list of mcr tags for azuremonitor/containerinsights/ciprod repository"
exit 1
fi
TAG_EXISTS=$(echo $MCR_TAG_RESULT | jq '.tags | contains(["'"$AGENT_IMAGE_TAG_SUFFIX"'"])')

if $TAG_EXISTS; then
echo "-e error ${AGENT_IMAGE_TAG_SUFFIX} already exists in mcr. make sure the image tag is unique"
exit 1
fi

if [ -z $AGENT_RELEASE ]; then
echo "-e error AGENT_RELEASE shouldnt be empty. check release variables"
exit 1
fi
#!

if [ -z $AGENT_IMAGE_FULL_PATH ]; then
echo "-e error AGENT_IMAGE_FULL_PATH shouldnt be empty. check release variables"
exit 1
Expand Down