diff --git a/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml b/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml index 753617f7ee..45a0cf20b7 100644 --- a/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml +++ b/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml @@ -204,7 +204,7 @@ jobs: # Determine possible parameters depending on file type if ((Split-Path $moduleTestFilePath -Extension) -eq '.bicep') { - $moduleTemplateContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable + $moduleTemplateContent = bicep build $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $moduleTemplatePossibleParameters = $moduleTemplateContent.parameters.Keys } else { $moduleTemplatePossibleParameters = ((Get-Content $moduleTestFilePath -Raw) | ConvertFrom-Json -AsHashtable).parameters.keys @@ -259,7 +259,7 @@ jobs: # Determine possible parameters depending on file type if ((Split-Path $moduleTestFilePath -Extension) -eq '.bicep') { - $moduleTemplateContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable + $moduleTemplateContent = bicep build $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $moduleTemplatePossibleParameters = $moduleTemplateContent.parameters.Keys } else { $moduleTemplatePossibleParameters = ((Get-Content $moduleTestFilePath -Raw) | ConvertFrom-Json -AsHashtable).parameters.keys diff --git a/.github/actions/templates/validateModuleDeployment/action.yml b/.github/actions/templates/validateModuleDeployment/action.yml index 8edd8d20a2..cf7ea8a0ad 100644 --- a/.github/actions/templates/validateModuleDeployment/action.yml +++ b/.github/actions/templates/validateModuleDeployment/action.yml @@ -183,7 +183,7 @@ runs: # Determine possible parameters depending on file type if ((Split-Path $moduleTestFilePath -Extension) -eq '.bicep') { - $moduleTemplateContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable + $moduleTemplateContent = bicep build $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $moduleTemplatePossibleParameters = $moduleTemplateContent.parameters.Keys } else { $moduleTemplatePossibleParameters = ((Get-Content $moduleTestFilePath -Raw) | ConvertFrom-Json -AsHashtable).parameters.keys @@ -239,7 +239,7 @@ runs: # Determine possible parameters depending on file type if ((Split-Path $moduleTestFilePath -Extension) -eq '.bicep') { - $moduleTemplateContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable + $moduleTemplateContent = bicep build $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $moduleTemplatePossibleParameters = $moduleTemplateContent.parameters.Keys } else { $moduleTemplatePossibleParameters = ((Get-Content $moduleTestFilePath -Raw) | ConvertFrom-Json -AsHashtable).parameters.keys diff --git a/utilities/pipelines/staticValidation/module.tests.ps1 b/utilities/pipelines/staticValidation/module.tests.ps1 index 66594a037c..e512dabf78 100644 --- a/utilities/pipelines/staticValidation/module.tests.ps1 +++ b/utilities/pipelines/staticValidation/module.tests.ps1 @@ -30,7 +30,7 @@ $script:moduleFolderPaths = $moduleFolderPaths $script:convertedTemplates = @{} # Shared exception messages -$script:bicepTemplateCompilationFailedException = "Unable to compile the deploy.bicep template's content. This can happen if there is an error in the template. Please check if you can run the command ``az bicep build --file {0} --stdout | ConvertFrom-Json -AsHashtable``." # -f $templateFilePath +$script:bicepTemplateCompilationFailedException = "Unable to compile the deploy.bicep template's content. This can happen if there is an error in the template. Please check if you can run the command ``bicep build {0} --stdout | ConvertFrom-Json -AsHashtable``." # -f $templateFilePath $script:jsonTemplateLoadFailedException = "Unable to load the deploy.json template's content. This can happen if there is an error in the template. Please check if you can run the command `Get-Content {0} -Raw | ConvertFrom-Json -AsHashtable`." # -f $templateFilePath $script:templateNotFoundException = 'No template file found in folder [{0}]' # -f $moduleFolderPath @@ -170,7 +170,7 @@ Describe 'Readme tests' -Tag Readme { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = bicep build $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) @@ -684,7 +684,7 @@ Describe 'Deployment template tests' -Tag Template { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = bicep build $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) @@ -732,7 +732,7 @@ Describe 'Deployment template tests' -Tag Template { $deploymentTestFile_AllParameterNames = $rawContentHashtable.parameters.Keys | Sort-Object } else { - $deploymentFileContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable + $deploymentFileContent = bicep build $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $deploymentTestFile_AllParameterNames = $deploymentFileContent.resources[-1].properties.parameters.Keys | Sort-Object # The last resource should be the test } $testFileTestCases += @{ @@ -1218,7 +1218,7 @@ Describe "API version tests [All apiVersions in the template should be 'recent'] if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = bicep build $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) diff --git a/utilities/src/apiSpecsList.json b/utilities/src/apiSpecsList.json index a9998e5471..07e8bc8b14 100644 --- a/utilities/src/apiSpecsList.json +++ b/utilities/src/apiSpecsList.json @@ -2841,7 +2841,8 @@ "2021-08-01-preview", "2021-09-01", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ], "registries/agentPools": [ "2019-06-01-preview" @@ -2890,7 +2891,8 @@ "2021-08-01-preview", "2021-09-01", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ], "registries/replications": [ "2017-06-01-preview", @@ -2902,7 +2904,8 @@ "2021-08-01-preview", "2021-09-01", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ], "registries/scopeMaps": [ "2019-05-01-preview", @@ -2910,7 +2913,8 @@ "2021-06-01-preview", "2021-08-01-preview", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ], "registries/taskRuns": [ "2019-06-01-preview" @@ -2926,7 +2930,8 @@ "2021-06-01-preview", "2021-08-01-preview", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ], "registries/webhooks": [ "2017-06-01-preview", @@ -2938,7 +2943,8 @@ "2021-08-01-preview", "2021-09-01", "2021-12-01-preview", - "2022-02-01-preview" + "2022-02-01-preview", + "2022-12-01" ] }, "Microsoft.ContainerRegistry.Admin": { @@ -14201,6 +14207,17 @@ "2019-04-01" ] }, + "Microsoft.VoiceServices": { + "communicationsGateways": [ + "2022-12-01-preview" + ], + "communicationsGateways/contacts": [ + "2022-12-01-preview" + ], + "communicationsGateways/testLines": [ + "2022-12-01-preview" + ] + }, "Microsoft.Web": { "certificates": [ "2015-08-01", diff --git a/utilities/tools/ConvertTo-ARMTemplate.ps1 b/utilities/tools/ConvertTo-ARMTemplate.ps1 index 96fdd03dc1..e99b24c78f 100644 --- a/utilities/tools/ConvertTo-ARMTemplate.ps1 +++ b/utilities/tools/ConvertTo-ARMTemplate.ps1 @@ -100,12 +100,12 @@ function ConvertTo-ARMTemplate { $expectedJSONFilePath = Join-Path (Split-Path $_ -Parent) ('{0}.json' -f (Split-Path $_ -LeafBase)) if (-not (Test-Path $expectedJSONFilePath)) { Write-Verbose "Building template [$_]" - az bicep build --file $_ + bicep build $_ } else { Write-Verbose "Template [$expectedJSONFilePath] already existing" } } - if ($PSCmdlet.ShouldProcess(('Bicep [{0}] Templates' -f ($BicepFilesToConvert.count)), 'az bicep build')) { + if ($PSCmdlet.ShouldProcess(('Bicep [{0}] Templates' -f ($BicepFilesToConvert.count)), 'bicep build')) { if ($RunSynchronous) { $BicepFilesToConvert | ForEach-Object $buildScriptBlock } else { diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index ce589c2f53..fcf4384711 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -1464,7 +1464,7 @@ function Set-ModuleReadMe { if (-not $TemplateFileContent) { if ((Split-Path -Path $TemplateFilePath -Extension) -eq '.bicep') { - $templateFileContent = az bicep build --file $TemplateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateFileContent = bicep build $TemplateFilePath --stdout | ConvertFrom-Json -AsHashtable } else { $templateFileContent = ConvertFrom-Json (Get-Content $TemplateFilePath -Encoding 'utf8' -Raw) -ErrorAction Stop -AsHashtable }