From 97e7d92b9e8a6fd24aeadd8ba8485225f0a6e827 Mon Sep 17 00:00:00 2001 From: sarahpeiffer Date: Mon, 13 Sep 2021 12:36:31 -0700 Subject: [PATCH] Install unzip package on shell extension --- .../Parameters/ContainerInsights.Linux.Parameters.json | 4 ---- .../ServiceGroupRoot/Scripts/pushAgentToAcr.sh | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deployment/agent-deployment/ServiceGroupRoot/Parameters/ContainerInsights.Linux.Parameters.json b/deployment/agent-deployment/ServiceGroupRoot/Parameters/ContainerInsights.Linux.Parameters.json index 598ce9698..be9ddb6d6 100644 --- a/deployment/agent-deployment/ServiceGroupRoot/Parameters/ContainerInsights.Linux.Parameters.json +++ b/deployment/agent-deployment/ServiceGroupRoot/Parameters/ContainerInsights.Linux.Parameters.json @@ -27,10 +27,6 @@ "pushAgentToAcr.sh" ], "environmentVariables": [ - { - "name": "WINDOWS", - "value": "" - }, { "name": "AGENT_IMAGE_URI", "value": "__CONTAINER_URI__" diff --git a/deployment/agent-deployment/ServiceGroupRoot/Scripts/pushAgentToAcr.sh b/deployment/agent-deployment/ServiceGroupRoot/Scripts/pushAgentToAcr.sh index 7e73a6230..3d4062c91 100644 --- a/deployment/agent-deployment/ServiceGroupRoot/Scripts/pushAgentToAcr.sh +++ b/deployment/agent-deployment/ServiceGroupRoot/Scripts/pushAgentToAcr.sh @@ -87,7 +87,13 @@ if [[ "$AGENT_IMAGE_TAR_FILE_NAME" == *"tar.gz"* ]]; then fi if [[ "$AGENT_IMAGE_TAR_FILE_NAME" == *"tar.zip"* ]]; then - unzip $AGENT_IMAGE_TAR_FILE_NAME + sudo apt-get install unzip + if [ $? -eq 0 ]; then + unzip $AGENT_IMAGE_TAR_FILE_NAME + else + echo "-e error failed to install unzip package and cannot unzip windows agent tarball" + exit 1 + fi fi echo "Pushing file $TARBALL_IMAGE_FILE to $AGENT_IMAGE_FULL_PATH"