From 51f0dcc295a9e675f94575671fd8b906dea94c4c Mon Sep 17 00:00:00 2001 From: Karthick Narendran Date: Fri, 29 Apr 2022 22:52:26 +0100 Subject: [PATCH] Create test.sh --- test.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..5e4e877 --- /dev/null +++ b/test.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT license. + +ENVCODE=$ENVCODE +LOCATION=$LOCATION +PIPELINE_NAME=$PIPELINE_NAME +ENVTAG=$ENVTAG + + +set -x + +if [[ -z "$ENVCODE" ]] + then + echo "Environment Code value not supplied" + exit 1 +fi + +if [[ -z "$LOCATION" ]] + then + echo "Location value not supplied" + exit 1 +fi + +echo "Performing bicep template deployment" +if [[ -z "$ENVTAG" ]] + then + ./deploy/install.sh "$ENVCODE" "$LOCATION" + else + ./deploy/install.sh "$ENVCODE" "$LOCATION" "$ENVTAG" +fi + +echo "Performing configuration" +./deploy/configure.sh "$ENVCODE" + +if [[ -z "$PIPELINE_NAME" ]] + then + echo "Skipping pipeline packaging" + else + echo "Performing pipeline packaging" + ./deploy/package.sh "$ENVCODE" "$PIPELINE_NAME" +fi + +set +x