From a731bf4d72e4d9327137ac7307cb2c5d149b9982 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 29 Mar 2022 14:36:04 +0200 Subject: [PATCH] Add updated scripts --- docs/scripts/createRGandcallBicep.ps1 | 4 ++-- docs/scripts/createRGandcallBicep.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/scripts/createRGandcallBicep.ps1 b/docs/scripts/createRGandcallBicep.ps1 index 757792996..910da62a1 100644 --- a/docs/scripts/createRGandcallBicep.ps1 +++ b/docs/scripts/createRGandcallBicep.ps1 @@ -1,6 +1,6 @@ $azureResourceGroup='rsg-private-bicep-registry' -$azureLocation='EastUs' +$azureLocation='eastus' #Create resource group New-AzResourceGroup -Name $azureResourceGroup -Location $azureLocation @@ -15,7 +15,7 @@ $azureContainerRegistryName=$deploymentOutput.Outputs.outLoginServer.Value #Leverage Powershell too loop through all bicep modules within the repository #convert the filename to lower case as Azure Container Registry doesnt support Camelcase #Leverage az bicep to publish module to Azure Container Registry created above -$files = $(Get-ChildItem("$pwd/infra-as-code/bicep/modules/*/*.bicep")) +$files = $(Get-ChildItem -path "$pwd/infra-as-code/bicep/modules" -Recurse -Include *.bicep -exclude *orch-hubSpoke.bicep) foreach ($file in $files) { diff --git a/docs/scripts/createRGandcallBicep.sh b/docs/scripts/createRGandcallBicep.sh index 8891ccc92..7cd6c06cf 100644 --- a/docs/scripts/createRGandcallBicep.sh +++ b/docs/scripts/createRGandcallBicep.sh @@ -1,7 +1,7 @@ #!/bin/bash azureResourceGroup='rsg-private-bicep-registry' -azureLocation='EastUs' +azureLocation='eastus' #Create resource group az group create --name $azureResourceGroup --location $azureLocation @@ -16,7 +16,7 @@ azureContainerRegistryName=$(az deployment group show -n deployACR -g $azureReso #Leverage Bash utilities too loop through all bicep modules within the repository #convert the filename to lower case as Azure Container Registry doesnt support Camelcase #Leverage az bicep to publish module to Azure Container Registry created above -for file in infra-as-code/bicep/modules/*/*.bicep +for file in $(find ./infra-as-code/bicep/modules -type f -name "*.bicep" ! -path "./infra-as-code/bicep/modules/unstable*") do f=$(echo "${file##*/}"); filename=$(echo $f| cut -d'.' -f 1| tr '[:upper:]' '[:lower:]')