diff --git a/.azuredevops/pipelineTemplates/jobs.publishModule.yml b/.azuredevops/pipelineTemplates/jobs.publishModule.yml index d60dbb4247..3fefee7e56 100644 --- a/.azuredevops/pipelineTemplates/jobs.publishModule.yml +++ b/.azuredevops/pipelineTemplates/jobs.publishModule.yml @@ -21,12 +21,13 @@ ## |======================================================================================================================================================================================================================| ## | Parameter | Default Value | Description | Example | ## |---------------------------------|--------------------------------------|---------------------------------------------------------------------------------------------------------|-----------------------------------| -## | displayName | 'Publishing' | Name for the pipeline job | 'Publish KeyVault' | +## | displayName | 'Publishing' | Name for the pipeline job | 'Publish KeyVault' | ## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | ## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | ## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | ## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | ## | modulePath | '$(modulePath)' | The path to the module to deploy. E.g. [c:/KeyVault] | 'c:/KeyVault' | +## | publishLatest | '$(publishLatest)' | Flag to indicate whether or not to publish a "latest" version to Bicep Registry and Template Specs | true | ## | templateSpecsRGName | '$(templateSpecsRGName)' | Required to publish to template spec. ResourceGroup of the template spec to publish to | 'mgmt-rg' | ## | templateSpecsRGLocation | '$(templateSpecsRGLocation)' | Required to publish to template spec. Location of the template spec resource group | 'West Europe' | ## | templateSpecsDescription | '$(templateSpecsDescription)' | Required to publish to template spec. Description of the template spec to publish to | 'IaCs module' | @@ -56,6 +57,9 @@ parameters: ## Module-related modulePath: '$(modulePath)' + # Shared + publishLatest: '$(publishLatest)' + ## TemplateSpec-related templateSpecsDoPublish: '$(templateSpecsDoPublish)' templateSpecsRGName: '$(templateSpecsRGName)' @@ -129,7 +133,8 @@ jobs: script: | # Load used functions . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesToPublish.ps1') - . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToUniversalArtifactFeed.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToUniversalArtifactsFeed.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesMissingFromUniversalArtifactsFeed.ps1') #Prioritizing the bicep file $TemplateFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' 'deploy.bicep' @@ -137,34 +142,63 @@ jobs: $TemplateFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' 'deploy.json' } + ################################ + ## Get modules to publish ## + ################################ $functionInput = @{ TemplateFilePath = $TemplateFilePath + PublishLatest = $false # Not supported by Azure DevOps feeds } Write-Verbose "Invoke Get-ModulesToPublish with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + $modulesToPublish = @() + # Get the modified child resources - $ModulesToPublish = Get-ModulesToPublish @functionInput -Verbose + $modulesToPublish += Get-ModulesToPublish @functionInput -Verbose + + ############################# + ## Get missing modules ## + ############################# + # Add all modules that don't exist in the target location + $missingInputObject = @{ + TemplateFilePath = $TemplateFilePath + VstsOrganizationUri = '${{ parameters.vstsOrganizationUri }}' + VstsFeedProject = '${{ parameters.vstsFeedProject }}' + VstsFeedName = '${{ parameters.vstsFeedName }}' + } - # Publish the modified child resources - foreach ($ModuleToPublish in $ModulesToPublish) { - $RelPath = (($ModuleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] - Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $ModuleToPublish.Version)" + Write-Verbose "Invoke Get-ModulesMissingFromUniversalArtifactsFeed with" -Verbose + Write-Verbose ($missingInputObject | ConvertTo-Json | Out-String) -Verbose + + $missingModules = Get-ModulesMissingFromUniversalArtifactsFeed @missingInputObject -BearerToken $env:TOKEN + + foreach($missingModule in $missingModules) { + if($modulsToPublish.TemplateFilePath -notcontains $missingModule.TemplateFilePath) { + $modulesToPublish += $missingModule + } + } + + ################# + ## Publish ## + ################# + foreach ($moduleToPublish in $modulesToPublish) { + $RelPath = (($moduleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] + Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $moduleToPublish.Version)" $functionInput = @{ - TemplateFilePath = $ModuleToPublish.TemplateFilePath + TemplateFilePath = $moduleToPublish.TemplateFilePath VstsOrganizationUri = '${{ parameters.vstsOrganizationUri }}' - VstsFeedProject = '${{ parameters.vstsFeedProject }}' - VstsFeedName = '${{ parameters.vstsFeedName }}' - ModuleVersion = $ModuleToPublish.Version - BearerToken = $env:TOKEN + VstsFeedProject = '${{ parameters.vstsFeedProject }}' + VstsFeedName = '${{ parameters.vstsFeedName }}' + ModuleVersion = $moduleToPublish.Version } - Write-Verbose "Invoke Publish-ModuleToUniversalArtifactFeed with" -Verbose + Write-Verbose "Invoke Publish-ModuleToUniversalArtifactsFeed with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - Publish-ModuleToUniversalArtifactFeed @functionInput -Verbose + Publish-ModuleToUniversalArtifactsFeed @functionInput -BearerToken $env:TOKEN -Verbose Write-Host "##[endgroup]" } env: @@ -188,7 +222,8 @@ jobs: inline: | # Load used functions . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesToPublish.ps1') - . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToTemplateSpec.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesMissingFromTemplateSpecsRG.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToTemplateSpecsRG.ps1') #Prioritizing the bicep file $TemplateFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' 'deploy.bicep' @@ -196,33 +231,63 @@ jobs: $TemplateFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' 'deploy.json' } + ################################ + ## Get modules to publish ## + ################################ $functionInput = @{ TemplateFilePath = $TemplateFilePath + PublishLatest = [bool] '${{ parameters.publishLatest }}' } Write-Verbose "Invoke Get-ModulesToPublish with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + $modulesToPublish = @() + # Get the modified child resources - $ModulesToPublish = Get-ModulesToPublish @functionInput -Verbose + $modulesToPublish += Get-ModulesToPublish @functionInput -Verbose + + ############################# + ## Get missing modules ## + ############################# + + # Add all modules that don't exist in the target location + $missingInputObject = @{ + TemplateFilePath = $TemplateFilePath + TemplateSpecsRGName = '${{ parameters.templateSpecsRgName }}' + PublishLatest = [bool] '${{ parameters.bicepRegistryRgName }}' + } - # Publish the modified child resources - foreach ($ModuleToPublish in $ModulesToPublish) { - $RelPath = (($ModuleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] - Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $ModuleToPublish.Version)" + Write-Verbose "Invoke Get-ModulesMissingFromTemplateSpecsRG with" -Verbose + Write-Verbose ($missingInputObject | ConvertTo-Json | Out-String) -Verbose + + $missingModules = Get-ModulesMissingFromTemplateSpecsRG @missingInputObject + + foreach($missingModule in $missingModules) { + if($modulsToPublish.TemplateFilePath -notcontains $missingModule.TemplateFilePath) { + $modulesToPublish += $missingModule + } + } + + ################# + ## Publish ## + ################# + foreach ($moduleToPublish in $modulesToPublish) { + $RelPath = (($moduleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] + Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $moduleToPublish.Version)" $functionInput = @{ - TemplateFilePath = $ModuleToPublish.TemplateFilePath + TemplateFilePath = $moduleToPublish.TemplateFilePath TemplateSpecsRgName = '${{ parameters.templateSpecsRgName }}' TemplateSpecsRgLocation = '${{ parameters.templateSpecsRgLocation }}' TemplateSpecsDescription = '${{ parameters.templateSpecsDescription }}' - ModuleVersion = $ModuleToPublish.Version + ModuleVersion = $moduleToPublish.Version } - Write-Verbose "Invoke Publish-ModuleToTemplateSpec with" -Verbose + Write-Verbose "Invoke Publish-ModuleToTemplateSpecsRG with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - Publish-ModuleToTemplateSpec @functionInput -Verbose + Publish-ModuleToTemplateSpecsRG @functionInput -Verbose Write-Host "##[endgroup]" } @@ -244,10 +309,11 @@ jobs: . $profile # Load PS-Profile configuration $SecuredPassword = ConvertTo-SecureString -AsPlainText -String $env:servicePrincipalKey $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:servicePrincipalId, $SecuredPassword - Connect-AzAccount -ServicePrincipal -TenantId $env:tenantId -Credential $Credential + $null = Connect-AzAccount -ServicePrincipal -TenantId $env:tenantId -Credential $Credential # Load used functions . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesToPublish.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Get-ModulesMissingFromPrivateBicepRegistry.ps1') . (Join-Path '$(System.DefaultWorkingDirectory)' '$(pipelineFunctionsPath)' 'resourcePublish' 'Publish-ModuleToPrivateBicepRegistry.ps1') #Prioritizing the bicep file @@ -256,27 +322,57 @@ jobs: $TemplateFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' 'deploy.json' } + ################################ + ## Get modules to publish ## + ################################ $functionInput = @{ TemplateFilePath = $TemplateFilePath + PublishLatest = [bool] '${{ parameters.publishLatest }}' } Write-Verbose "Invoke Get-ModulesToPublish with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose + $modulesToPublish = @() + # Get the modified child resources - $ModulesToPublish = Get-ModulesToPublish @functionInput -Verbose + $modulesToPublish += Get-ModulesToPublish @functionInput -Verbose + + ############################# + ## Get missing modules ## + ############################# + # Add all modules that don't exist in the target location + $missingInputObject = @{ + TemplateFilePath = $TemplateFilePath + BicepRegistryName = '${{ parameters.bicepRegistryName }}' + BicepRegistryRgName = '${{ parameters.bicepRegistryRgName }}' + PublishLatest = [bool] '${{ parameters.bicepRegistryRgName }}' + } + + Write-Verbose "Invoke Get-ModulesMissingFromPrivateBicepRegistry with" -Verbose + Write-Verbose ($missingInputObject | ConvertTo-Json | Out-String) -Verbose + + $missingModules = Get-ModulesMissingFromPrivateBicepRegistry @missingInputObject + + foreach($missingModule in $missingModules) { + if($modulsToPublish.TemplateFilePath -notcontains $missingModule.TemplateFilePath) { + $modulesToPublish += $missingModule + } + } - # Publish the modified child resources - foreach ($ModuleToPublish in $ModulesToPublish) { - $RelPath = (($ModuleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] - Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $ModuleToPublish.Version)" + ################# + ## Publish ## + ################# + foreach ($moduleToPublish in $modulesToPublish) { + $RelPath = (($moduleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] + Write-Host "##[group]$(' - [{0}] [{1}]' -f $RelPath, $moduleToPublish.Version)" $functionInput = @{ - TemplateFilePath = $ModuleToPublish.TemplateFilePath + TemplateFilePath = $moduleToPublish.TemplateFilePath BicepRegistryName = '${{ parameters.bicepRegistryName }}' BicepRegistryRgName = '${{ parameters.bicepRegistryRgName }}' BicepRegistryRgLocation = '${{ parameters.bicepRegistryRgLocation }}' - ModuleVersion = $ModuleToPublish.Version + ModuleVersion = $moduleToPublish.Version } Write-Verbose "Invoke Publish-ModuleToPrivateBicepRegistry with" -Verbose diff --git a/.github/actions/templates/publishModule/action.yml b/.github/actions/templates/publishModule/action.yml index 7632bdafde..14e45f965e 100644 --- a/.github/actions/templates/publishModule/action.yml +++ b/.github/actions/templates/publishModule/action.yml @@ -24,6 +24,7 @@ ## | bicepRegistryRgName | false | '' | Required to publish to private bicep registry. Name of the container registry resource group | 'artifacts-rg' | ## | bicepRegistryRgLocation | false | '' | Required to publish to private bicep registry. Location of the container registry resource group | 'WestEurope' | ## | bicepRegistryDoPublish | false | 'false' | Flag to indicate whether or not to publish to the private bicep registry | 'true' | +## | publishLatest | false | 'true' | Flag to indicate whether or not to publish a "latest" version | 'true' | ## |===========================================================================================================================================================================================================| ## ##---------------------------------------------## @@ -60,6 +61,10 @@ inputs: description: 'Flag to indicate whether or not to publish to the private bicep registry' default: 'false' required: false + publishLatest: + description: 'Flag to indicate whether or not to publish a "latest" version' + default: 'true' + required: false runs: using: 'composite' @@ -102,35 +107,66 @@ runs: # Load used functions . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Get-ModulesToPublish.ps1') - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Publish-ModuleToTemplateSpec.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Get-ModulesMissingFromTemplateSpecsRG.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Publish-ModuleToTemplateSpecsRG.ps1') + + $modulesToPublish = @() + ################################ + ## Get modules to publish ## + ################################ $functionInput = @{ TemplateFilePath = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.templateFilePath }}" + PublishLatest = [bool] "${{ inputs.publishLatest }}" } Write-Verbose "Invoke task with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose # Get the modified child resources - $ModulesToPublish = Get-ModulesToPublish @functionInput -Verbose + $modulesToPublish += Get-ModulesToPublish @functionInput -Verbose + + ############################# + ## Get missing modules ## + ############################# + + # Add all modules that don't exist in the target location + $missingInputObject = @{ + TemplateFilePath = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.templateFilePath }}" + TemplateSpecsRGName = '${{ inputs.templateSpecsRgName }}' + PublishLatest = [bool] "${{ inputs.publishLatest }}" + } - # Publish the modified child resources - foreach ($ModuleToPublish in $ModulesToPublish) { - $RelPath = (($ModuleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] - Write-Output "::group::$(' - [{0}] [{1}]' -f $RelPath, $ModuleToPublish.Version)" + Write-Verbose "Invoke Get-ModulesMissingFromTemplateSpecsRG with" -Verbose + Write-Verbose ($missingInputObject | ConvertTo-Json | Out-String) -Verbose + + $missingModules = Get-ModulesMissingFromTemplateSpecsRG @missingInputObject + + foreach($missingModule in $missingModules) { + if($modulsToPublish.TemplateFilePath -notcontains $missingModule.TemplateFilePath) { + $modulesToPublish += $missingModule + } + } + + ################# + ## Publish ## + ################# + foreach ($moduleToPublish in $modulesToPublish) { + $RelPath = (($moduleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] + Write-Output "::group::$(' - [{0}] [{1}]' -f $RelPath, $moduleToPublish.Version)" $functionInput = @{ - TemplateFilePath = $ModuleToPublish.TemplateFilePath + TemplateFilePath = $moduleToPublish.TemplateFilePath TemplateSpecsRgName = '${{ inputs.templateSpecsRgName }}' TemplateSpecsRgLocation = '${{ inputs.templateSpecsRgLocation }}' TemplateSpecsDescription = '${{ inputs.templateSpecsDescription }}' - ModuleVersion = $ModuleToPublish.Version + ModuleVersion = $moduleToPublish.Version } Write-Verbose "Invoke task with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - Publish-ModuleToTemplateSpec @functionInput -Verbose + Publish-ModuleToTemplateSpecsRG @functionInput -Verbose } Write-Output '::endgroup::' @@ -146,29 +182,60 @@ runs: # Load used functions . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Get-ModulesToPublish.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Get-ModulesMissingFromPrivateBicepRegistry.ps1') . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'resourcePublish' 'Publish-ModuleToPrivateBicepRegistry.ps1') + $modulesToPublish = @() + + ################################ + ## Get modules to publish ## + ################################ $functionInput = @{ TemplateFilePath = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.templateFilePath }}" + PublishLatest = [bool] "${{ inputs.publishLatest }}" } Write-Verbose "Invoke task with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose # Get the modified child resources - $ModulesToPublish = Get-ModulesToPublish @functionInput -Verbose + $modulesToPublish += Get-ModulesToPublish @functionInput -Verbose + + ############################# + ## Get missing modules ## + ############################# + # Add all modules that don't exist in the target location + $missingInputObject = @{ + TemplateFilePath = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.templateFilePath }}" + BicepRegistryName = '${{ inputs.bicepRegistryName }}' + BicepRegistryRgName = '${{ inputs.bicepRegistryRgName }}' + PublishLatest = [bool] "${{ inputs.publishLatest }}" + } + + Write-Verbose "Invoke Get-ModulesMissingFromPrivateBicepRegistry with" -Verbose + Write-Verbose ($missingInputObject | ConvertTo-Json | Out-String) -Verbose + + $missingModules = Get-ModulesMissingFromPrivateBicepRegistry @missingInputObject + + foreach($missingModule in $missingModules) { + if($modulsToPublish.TemplateFilePath -notcontains $missingModule.TemplateFilePath) { + $modulesToPublish += $missingModule + } + } - # Publish the modified child resources - foreach ($ModuleToPublish in $ModulesToPublish) { - $RelPath = (($ModuleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] - Write-Output "::group::$(' - [{0}] [{1}]' -f $RelPath, $ModuleToPublish.Version)" + ################# + ## Publish ## + ################# + foreach ($moduleToPublish in $modulesToPublish) { + $RelPath = (($moduleToPublish.TemplateFilePath).Split('/modules/')[-1]).Split('/deploy.')[0] + Write-Output "::group::$(' - [{0}] [{1}]' -f $RelPath, $moduleToPublish.Version)" $functionInput = @{ - TemplateFilePath = $ModuleToPublish.TemplateFilePath + TemplateFilePath = $moduleToPublish.TemplateFilePath BicepRegistryName = '${{ inputs.bicepRegistryName }}' BicepRegistryRgName = '${{ inputs.bicepRegistryRgName }}' BicepRegistryRgLocation = '${{ inputs.bicepRegistryRgLocation }}' - ModuleVersion = $ModuleToPublish.Version + ModuleVersion = $moduleToPublish.Version } Write-Verbose "Invoke task with" -Verbose diff --git a/.github/workflows/ms.aad.domainservices.yml b/.github/workflows/ms.aad.domainservices.yml index bea7368e4a..ed5a54b098 100644 --- a/.github/workflows/ms.aad.domainservices.yml +++ b/.github/workflows/ms.aad.domainservices.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.analysisservices.servers.yml b/.github/workflows/ms.analysisservices.servers.yml index 66aab28f11..4a0edb274d 100644 --- a/.github/workflows/ms.analysisservices.servers.yml +++ b/.github/workflows/ms.analysisservices.servers.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.apimanagement.service.yml b/.github/workflows/ms.apimanagement.service.yml index b990de8f8e..9e781c789d 100644 --- a/.github/workflows/ms.apimanagement.service.yml +++ b/.github/workflows/ms.apimanagement.service.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.appconfiguration.configurationstores.yml b/.github/workflows/ms.appconfiguration.configurationstores.yml index 92449de69b..39d5cb32d1 100644 --- a/.github/workflows/ms.appconfiguration.configurationstores.yml +++ b/.github/workflows/ms.appconfiguration.configurationstores.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.locks.yml b/.github/workflows/ms.authorization.locks.yml index 922efce236..e47d377a3f 100644 --- a/.github/workflows/ms.authorization.locks.yml +++ b/.github/workflows/ms.authorization.locks.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.policyassignments.yml b/.github/workflows/ms.authorization.policyassignments.yml index e83c6125f7..ea19a19bd9 100644 --- a/.github/workflows/ms.authorization.policyassignments.yml +++ b/.github/workflows/ms.authorization.policyassignments.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.policydefinitions.yml b/.github/workflows/ms.authorization.policydefinitions.yml index d234f7b9c5..63eacf5986 100644 --- a/.github/workflows/ms.authorization.policydefinitions.yml +++ b/.github/workflows/ms.authorization.policydefinitions.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.policyexemptions.yml b/.github/workflows/ms.authorization.policyexemptions.yml index d861f1af63..2a864963f7 100644 --- a/.github/workflows/ms.authorization.policyexemptions.yml +++ b/.github/workflows/ms.authorization.policyexemptions.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.policysetdefinitions.yml b/.github/workflows/ms.authorization.policysetdefinitions.yml index a826803430..a81ed166f7 100644 --- a/.github/workflows/ms.authorization.policysetdefinitions.yml +++ b/.github/workflows/ms.authorization.policysetdefinitions.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.roleassignments.yml b/.github/workflows/ms.authorization.roleassignments.yml index 755ea1be33..297344c93b 100644 --- a/.github/workflows/ms.authorization.roleassignments.yml +++ b/.github/workflows/ms.authorization.roleassignments.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.authorization.roledefinitions.yml b/.github/workflows/ms.authorization.roledefinitions.yml index ce4745a031..b657466fb2 100644 --- a/.github/workflows/ms.authorization.roledefinitions.yml +++ b/.github/workflows/ms.authorization.roledefinitions.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.automation.automationaccounts.yml b/.github/workflows/ms.automation.automationaccounts.yml index 786312e581..7a7855ce04 100644 --- a/.github/workflows/ms.automation.automationaccounts.yml +++ b/.github/workflows/ms.automation.automationaccounts.yml @@ -146,3 +146,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.batch.batchaccounts.yml b/.github/workflows/ms.batch.batchaccounts.yml index 9635ae2f6f..246a5a77ad 100644 --- a/.github/workflows/ms.batch.batchaccounts.yml +++ b/.github/workflows/ms.batch.batchaccounts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.cache.redis.yml b/.github/workflows/ms.cache.redis.yml index 1facc675b8..27da7f5fe6 100644 --- a/.github/workflows/ms.cache.redis.yml +++ b/.github/workflows/ms.cache.redis.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.cognitiveservices.accounts.yml b/.github/workflows/ms.cognitiveservices.accounts.yml index 408928922a..7d456fe40c 100644 --- a/.github/workflows/ms.cognitiveservices.accounts.yml +++ b/.github/workflows/ms.cognitiveservices.accounts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.availabilitysets.yml b/.github/workflows/ms.compute.availabilitysets.yml index 6db8b1384e..1784ca94de 100644 --- a/.github/workflows/ms.compute.availabilitysets.yml +++ b/.github/workflows/ms.compute.availabilitysets.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.diskencryptionsets.yml b/.github/workflows/ms.compute.diskencryptionsets.yml index 189f7f5063..bd17fc58dd 100644 --- a/.github/workflows/ms.compute.diskencryptionsets.yml +++ b/.github/workflows/ms.compute.diskencryptionsets.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.disks.yml b/.github/workflows/ms.compute.disks.yml index b7e9d2fda7..47ab223610 100644 --- a/.github/workflows/ms.compute.disks.yml +++ b/.github/workflows/ms.compute.disks.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.galleries.yml b/.github/workflows/ms.compute.galleries.yml index 51cd01a842..238791993f 100644 --- a/.github/workflows/ms.compute.galleries.yml +++ b/.github/workflows/ms.compute.galleries.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.images.yml b/.github/workflows/ms.compute.images.yml index debfbd92e6..8e853c98bf 100644 --- a/.github/workflows/ms.compute.images.yml +++ b/.github/workflows/ms.compute.images.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.proximityplacementgroups.yml b/.github/workflows/ms.compute.proximityplacementgroups.yml index 7e624f7672..7e1b687d2d 100644 --- a/.github/workflows/ms.compute.proximityplacementgroups.yml +++ b/.github/workflows/ms.compute.proximityplacementgroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.virtualmachines.yml b/.github/workflows/ms.compute.virtualmachines.yml index a17142657a..e5e729e9de 100644 --- a/.github/workflows/ms.compute.virtualmachines.yml +++ b/.github/workflows/ms.compute.virtualmachines.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.compute.virtualmachinescalesets.yml b/.github/workflows/ms.compute.virtualmachinescalesets.yml index a737ba5321..3529943dbb 100644 --- a/.github/workflows/ms.compute.virtualmachinescalesets.yml +++ b/.github/workflows/ms.compute.virtualmachinescalesets.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.consumption.budgets.yml b/.github/workflows/ms.consumption.budgets.yml index 269c7c0e1c..3e2c7b9977 100644 --- a/.github/workflows/ms.consumption.budgets.yml +++ b/.github/workflows/ms.consumption.budgets.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.containerinstance.containergroups.yml b/.github/workflows/ms.containerinstance.containergroups.yml index 4a8f367b10..2ea1ba524f 100644 --- a/.github/workflows/ms.containerinstance.containergroups.yml +++ b/.github/workflows/ms.containerinstance.containergroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.containerregistry.registries.yml b/.github/workflows/ms.containerregistry.registries.yml index 6409a19deb..92c945ead9 100644 --- a/.github/workflows/ms.containerregistry.registries.yml +++ b/.github/workflows/ms.containerregistry.registries.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.containerservice.managedclusters.yml b/.github/workflows/ms.containerservice.managedclusters.yml index 19cdb8f5a2..3e17a1f1fe 100644 --- a/.github/workflows/ms.containerservice.managedclusters.yml +++ b/.github/workflows/ms.containerservice.managedclusters.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.databricks.workspaces.yml b/.github/workflows/ms.databricks.workspaces.yml index ba4aae7f25..979d13dc36 100644 --- a/.github/workflows/ms.databricks.workspaces.yml +++ b/.github/workflows/ms.databricks.workspaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.datafactory.factories.yml b/.github/workflows/ms.datafactory.factories.yml index 33d2c888ca..47b03e8678 100644 --- a/.github/workflows/ms.datafactory.factories.yml +++ b/.github/workflows/ms.datafactory.factories.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.dataprotection.backupvaults.yml b/.github/workflows/ms.dataprotection.backupvaults.yml index 487b6a60b2..278814fd3c 100644 --- a/.github/workflows/ms.dataprotection.backupvaults.yml +++ b/.github/workflows/ms.dataprotection.backupvaults.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml index 8c693c1d65..b7c53dd81f 100644 --- a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml +++ b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml @@ -148,3 +148,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml index 78ef03a9b1..23b5de8b26 100644 --- a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml +++ b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.desktopvirtualization.hostpools.yml b/.github/workflows/ms.desktopvirtualization.hostpools.yml index cde570e0bb..555f40c312 100644 --- a/.github/workflows/ms.desktopvirtualization.hostpools.yml +++ b/.github/workflows/ms.desktopvirtualization.hostpools.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.desktopvirtualization.scalingplans.yml b/.github/workflows/ms.desktopvirtualization.scalingplans.yml index 3169c3c4b2..f433fd4e8d 100644 --- a/.github/workflows/ms.desktopvirtualization.scalingplans.yml +++ b/.github/workflows/ms.desktopvirtualization.scalingplans.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.desktopvirtualization.workspaces.yml b/.github/workflows/ms.desktopvirtualization.workspaces.yml index 70ca816bb8..6484f0023b 100644 --- a/.github/workflows/ms.desktopvirtualization.workspaces.yml +++ b/.github/workflows/ms.desktopvirtualization.workspaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.documentdb.databaseaccounts.yml b/.github/workflows/ms.documentdb.databaseaccounts.yml index 47c52bc25e..639aa4b2d5 100644 --- a/.github/workflows/ms.documentdb.databaseaccounts.yml +++ b/.github/workflows/ms.documentdb.databaseaccounts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.eventgrid.systemtopics.yml b/.github/workflows/ms.eventgrid.systemtopics.yml index 04df367a94..337eea6892 100644 --- a/.github/workflows/ms.eventgrid.systemtopics.yml +++ b/.github/workflows/ms.eventgrid.systemtopics.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.eventgrid.topics.yml b/.github/workflows/ms.eventgrid.topics.yml index acedecee33..4b05761052 100644 --- a/.github/workflows/ms.eventgrid.topics.yml +++ b/.github/workflows/ms.eventgrid.topics.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.eventhub.namespaces.yml b/.github/workflows/ms.eventhub.namespaces.yml index 64c94bbf68..ffe50e08d3 100644 --- a/.github/workflows/ms.eventhub.namespaces.yml +++ b/.github/workflows/ms.eventhub.namespaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.healthbot.healthbots.yml b/.github/workflows/ms.healthbot.healthbots.yml index e97b8d74fa..4909a5ebe6 100644 --- a/.github/workflows/ms.healthbot.healthbots.yml +++ b/.github/workflows/ms.healthbot.healthbots.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.actiongroups.yml b/.github/workflows/ms.insights.actiongroups.yml index aa6b260fce..06a118b3ca 100644 --- a/.github/workflows/ms.insights.actiongroups.yml +++ b/.github/workflows/ms.insights.actiongroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.activitylogalerts.yml b/.github/workflows/ms.insights.activitylogalerts.yml index 529105c4d3..b8c1d0065d 100644 --- a/.github/workflows/ms.insights.activitylogalerts.yml +++ b/.github/workflows/ms.insights.activitylogalerts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.components.yml b/.github/workflows/ms.insights.components.yml index 86dd6ae31f..ad8ca41c18 100644 --- a/.github/workflows/ms.insights.components.yml +++ b/.github/workflows/ms.insights.components.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.diagnosticsettings.yml b/.github/workflows/ms.insights.diagnosticsettings.yml index 922956cdf1..488df94a6b 100644 --- a/.github/workflows/ms.insights.diagnosticsettings.yml +++ b/.github/workflows/ms.insights.diagnosticsettings.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.metricalerts.yml b/.github/workflows/ms.insights.metricalerts.yml index 5fd6c88977..45e1ef74d7 100644 --- a/.github/workflows/ms.insights.metricalerts.yml +++ b/.github/workflows/ms.insights.metricalerts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.privatelinkscopes.yml b/.github/workflows/ms.insights.privatelinkscopes.yml index a40eee8a25..9561a5a575 100644 --- a/.github/workflows/ms.insights.privatelinkscopes.yml +++ b/.github/workflows/ms.insights.privatelinkscopes.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.insights.scheduledqueryrules.yml b/.github/workflows/ms.insights.scheduledqueryrules.yml index 5cb4d66690..db782bd331 100644 --- a/.github/workflows/ms.insights.scheduledqueryrules.yml +++ b/.github/workflows/ms.insights.scheduledqueryrules.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.keyvault.vaults.yml b/.github/workflows/ms.keyvault.vaults.yml index 924c68b64e..1c9883f6e0 100644 --- a/.github/workflows/ms.keyvault.vaults.yml +++ b/.github/workflows/ms.keyvault.vaults.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.kubernetesconfiguration.extensions.yml b/.github/workflows/ms.kubernetesconfiguration.extensions.yml index a535d32ff2..3e256dcf19 100644 --- a/.github/workflows/ms.kubernetesconfiguration.extensions.yml +++ b/.github/workflows/ms.kubernetesconfiguration.extensions.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml b/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml index 67336c1276..73a560ce87 100644 --- a/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml +++ b/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.logic.workflows.yml b/.github/workflows/ms.logic.workflows.yml index 48d989f048..ba6f17cf78 100644 --- a/.github/workflows/ms.logic.workflows.yml +++ b/.github/workflows/ms.logic.workflows.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.machinelearningservices.workspaces.yml b/.github/workflows/ms.machinelearningservices.workspaces.yml index 36b29e1d9a..2f45fabe34 100644 --- a/.github/workflows/ms.machinelearningservices.workspaces.yml +++ b/.github/workflows/ms.machinelearningservices.workspaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.maintenance.maintenanceconfigurations.yml b/.github/workflows/ms.maintenance.maintenanceconfigurations.yml index 225473afa6..84ade7e167 100644 --- a/.github/workflows/ms.maintenance.maintenanceconfigurations.yml +++ b/.github/workflows/ms.maintenance.maintenanceconfigurations.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.managedidentity.userassignedidentities.yml b/.github/workflows/ms.managedidentity.userassignedidentities.yml index 4ccc0a26d4..938e4f943b 100644 --- a/.github/workflows/ms.managedidentity.userassignedidentities.yml +++ b/.github/workflows/ms.managedidentity.userassignedidentities.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.managedservices.registrationdefinitions.yml b/.github/workflows/ms.managedservices.registrationdefinitions.yml index 344d9a8b24..10325043c3 100644 --- a/.github/workflows/ms.managedservices.registrationdefinitions.yml +++ b/.github/workflows/ms.managedservices.registrationdefinitions.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.management.managementgroups.yml b/.github/workflows/ms.management.managementgroups.yml index 33e9289c15..7bed33c412 100644 --- a/.github/workflows/ms.management.managementgroups.yml +++ b/.github/workflows/ms.management.managementgroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.netapp.netappaccounts.yml b/.github/workflows/ms.netapp.netappaccounts.yml index 341941adf1..1e5f200e32 100644 --- a/.github/workflows/ms.netapp.netappaccounts.yml +++ b/.github/workflows/ms.netapp.netappaccounts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.applicationgateways.yml b/.github/workflows/ms.network.applicationgateways.yml index d83b2e0670..2632e9dc25 100644 --- a/.github/workflows/ms.network.applicationgateways.yml +++ b/.github/workflows/ms.network.applicationgateways.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml b/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml index 3f973e0830..b912838dfe 100644 --- a/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml +++ b/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.applicationsecuritygroups.yml b/.github/workflows/ms.network.applicationsecuritygroups.yml index cd8a73b9e0..a8e0f40b29 100644 --- a/.github/workflows/ms.network.applicationsecuritygroups.yml +++ b/.github/workflows/ms.network.applicationsecuritygroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.azurefirewalls.yml b/.github/workflows/ms.network.azurefirewalls.yml index ead8027f38..1a698006ce 100644 --- a/.github/workflows/ms.network.azurefirewalls.yml +++ b/.github/workflows/ms.network.azurefirewalls.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.bastionhosts.yml b/.github/workflows/ms.network.bastionhosts.yml index 0befd2e610..ed6180f7fd 100644 --- a/.github/workflows/ms.network.bastionhosts.yml +++ b/.github/workflows/ms.network.bastionhosts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.connections.yml b/.github/workflows/ms.network.connections.yml index 2cc3f68ee2..ab04de70b3 100644 --- a/.github/workflows/ms.network.connections.yml +++ b/.github/workflows/ms.network.connections.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.ddosprotectionplans.yml b/.github/workflows/ms.network.ddosprotectionplans.yml index b17607160a..93ec9a542f 100644 --- a/.github/workflows/ms.network.ddosprotectionplans.yml +++ b/.github/workflows/ms.network.ddosprotectionplans.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.dnsresolvers.yml b/.github/workflows/ms.network.dnsresolvers.yml index c2e2c8bb79..990983682b 100644 --- a/.github/workflows/ms.network.dnsresolvers.yml +++ b/.github/workflows/ms.network.dnsresolvers.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.expressroutecircuits.yml b/.github/workflows/ms.network.expressroutecircuits.yml index df23b47277..b5cdea4265 100644 --- a/.github/workflows/ms.network.expressroutecircuits.yml +++ b/.github/workflows/ms.network.expressroutecircuits.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.firewallpolicies.yml b/.github/workflows/ms.network.firewallpolicies.yml index 3e5658b816..56d30cc806 100644 --- a/.github/workflows/ms.network.firewallpolicies.yml +++ b/.github/workflows/ms.network.firewallpolicies.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.frontdoors.yml b/.github/workflows/ms.network.frontdoors.yml index bb3e444c1f..d82b1987dc 100644 --- a/.github/workflows/ms.network.frontdoors.yml +++ b/.github/workflows/ms.network.frontdoors.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.ipgroups.yml b/.github/workflows/ms.network.ipgroups.yml index 1e823800bc..f5df5d4650 100644 --- a/.github/workflows/ms.network.ipgroups.yml +++ b/.github/workflows/ms.network.ipgroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.loadbalancers.yml b/.github/workflows/ms.network.loadbalancers.yml index b41f3198f0..ab1d0f22a6 100644 --- a/.github/workflows/ms.network.loadbalancers.yml +++ b/.github/workflows/ms.network.loadbalancers.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.localnetworkgateways.yml b/.github/workflows/ms.network.localnetworkgateways.yml index 2345ae037d..e414c055d2 100644 --- a/.github/workflows/ms.network.localnetworkgateways.yml +++ b/.github/workflows/ms.network.localnetworkgateways.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.natgateways.yml b/.github/workflows/ms.network.natgateways.yml index 3e2fa6cdb3..04230f8042 100644 --- a/.github/workflows/ms.network.natgateways.yml +++ b/.github/workflows/ms.network.natgateways.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.networkinterfaces.yml b/.github/workflows/ms.network.networkinterfaces.yml index c9581d0fff..2a7b75b7b4 100644 --- a/.github/workflows/ms.network.networkinterfaces.yml +++ b/.github/workflows/ms.network.networkinterfaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.networksecuritygroups.yml b/.github/workflows/ms.network.networksecuritygroups.yml index 280f57d60e..1fd42de76a 100644 --- a/.github/workflows/ms.network.networksecuritygroups.yml +++ b/.github/workflows/ms.network.networksecuritygroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.networkwatchers.yml b/.github/workflows/ms.network.networkwatchers.yml index 7f2e2a6704..68016ac2be 100644 --- a/.github/workflows/ms.network.networkwatchers.yml +++ b/.github/workflows/ms.network.networkwatchers.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.privatednszones.yml b/.github/workflows/ms.network.privatednszones.yml index 51e894ded9..a9152292f5 100644 --- a/.github/workflows/ms.network.privatednszones.yml +++ b/.github/workflows/ms.network.privatednszones.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.privateendpoints.yml b/.github/workflows/ms.network.privateendpoints.yml index 076238e2e9..8954e9e42c 100644 --- a/.github/workflows/ms.network.privateendpoints.yml +++ b/.github/workflows/ms.network.privateendpoints.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.privatelinkservices.yml b/.github/workflows/ms.network.privatelinkservices.yml index 2373e7d1a3..a63880ae24 100644 --- a/.github/workflows/ms.network.privatelinkservices.yml +++ b/.github/workflows/ms.network.privatelinkservices.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.publicipaddresses.yml b/.github/workflows/ms.network.publicipaddresses.yml index 9c3cebad10..c81837ee68 100644 --- a/.github/workflows/ms.network.publicipaddresses.yml +++ b/.github/workflows/ms.network.publicipaddresses.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.publicipprefixes.yml b/.github/workflows/ms.network.publicipprefixes.yml index 64a85e2be1..6fcc86d917 100644 --- a/.github/workflows/ms.network.publicipprefixes.yml +++ b/.github/workflows/ms.network.publicipprefixes.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.routetables.yml b/.github/workflows/ms.network.routetables.yml index fd1ce8e8c3..974bb1a967 100644 --- a/.github/workflows/ms.network.routetables.yml +++ b/.github/workflows/ms.network.routetables.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.trafficmanagerprofiles.yml b/.github/workflows/ms.network.trafficmanagerprofiles.yml index 265387fbaf..49cc6d2925 100644 --- a/.github/workflows/ms.network.trafficmanagerprofiles.yml +++ b/.github/workflows/ms.network.trafficmanagerprofiles.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.virtualhubs.yml b/.github/workflows/ms.network.virtualhubs.yml index 518a41cf26..0f5192cff6 100644 --- a/.github/workflows/ms.network.virtualhubs.yml +++ b/.github/workflows/ms.network.virtualhubs.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.virtualnetworkgateways.yml b/.github/workflows/ms.network.virtualnetworkgateways.yml index 884a4d2abe..01724d8c85 100644 --- a/.github/workflows/ms.network.virtualnetworkgateways.yml +++ b/.github/workflows/ms.network.virtualnetworkgateways.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.virtualnetworks.yml b/.github/workflows/ms.network.virtualnetworks.yml index 9e55ffa905..ccc0fa8f1b 100644 --- a/.github/workflows/ms.network.virtualnetworks.yml +++ b/.github/workflows/ms.network.virtualnetworks.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.virtualwans.yml b/.github/workflows/ms.network.virtualwans.yml index 41b30e0be8..7df0e6a00f 100644 --- a/.github/workflows/ms.network.virtualwans.yml +++ b/.github/workflows/ms.network.virtualwans.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.vpngateways.yml b/.github/workflows/ms.network.vpngateways.yml index 789480e108..66c6b509c5 100644 --- a/.github/workflows/ms.network.vpngateways.yml +++ b/.github/workflows/ms.network.vpngateways.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.network.vpnsites.yml b/.github/workflows/ms.network.vpnsites.yml index b1e51a3598..6e80c4cc79 100644 --- a/.github/workflows/ms.network.vpnsites.yml +++ b/.github/workflows/ms.network.vpnsites.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.operationalinsights.workspaces.yml b/.github/workflows/ms.operationalinsights.workspaces.yml index 78f624339e..68b02e8c94 100644 --- a/.github/workflows/ms.operationalinsights.workspaces.yml +++ b/.github/workflows/ms.operationalinsights.workspaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.operationsmanagement.solutions.yml b/.github/workflows/ms.operationsmanagement.solutions.yml index 858ad06352..b93bb6313f 100644 --- a/.github/workflows/ms.operationsmanagement.solutions.yml +++ b/.github/workflows/ms.operationsmanagement.solutions.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.powerbidedicated.capacities.yml b/.github/workflows/ms.powerbidedicated.capacities.yml index 0bbddcdeb6..7333ddba91 100644 --- a/.github/workflows/ms.powerbidedicated.capacities.yml +++ b/.github/workflows/ms.powerbidedicated.capacities.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.recoveryservices.vaults.yml b/.github/workflows/ms.recoveryservices.vaults.yml index 7ad1696050..cc470372e4 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.resources.deploymentscripts.yml b/.github/workflows/ms.resources.deploymentscripts.yml index fae23e9aba..d0066a9404 100644 --- a/.github/workflows/ms.resources.deploymentscripts.yml +++ b/.github/workflows/ms.resources.deploymentscripts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.resources.resourcegroups.yml b/.github/workflows/ms.resources.resourcegroups.yml index 0f4080a311..f08a60589d 100644 --- a/.github/workflows/ms.resources.resourcegroups.yml +++ b/.github/workflows/ms.resources.resourcegroups.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.resources.tags.yml b/.github/workflows/ms.resources.tags.yml index ceb1b35b36..9724a862de 100644 --- a/.github/workflows/ms.resources.tags.yml +++ b/.github/workflows/ms.resources.tags.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.security.azuresecuritycenter.yml b/.github/workflows/ms.security.azuresecuritycenter.yml index 975234e9ef..aa9275eed7 100644 --- a/.github/workflows/ms.security.azuresecuritycenter.yml +++ b/.github/workflows/ms.security.azuresecuritycenter.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.servicebus.namespaces.yml b/.github/workflows/ms.servicebus.namespaces.yml index 3e80c498db..9be069609a 100644 --- a/.github/workflows/ms.servicebus.namespaces.yml +++ b/.github/workflows/ms.servicebus.namespaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.servicefabric.clusters.yml b/.github/workflows/ms.servicefabric.clusters.yml index 2611597646..f46aaa2e43 100644 --- a/.github/workflows/ms.servicefabric.clusters.yml +++ b/.github/workflows/ms.servicefabric.clusters.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.signalrservice.webpubsub.yml b/.github/workflows/ms.signalrservice.webpubsub.yml index 52a981f0a5..0c74167d37 100644 --- a/.github/workflows/ms.signalrservice.webpubsub.yml +++ b/.github/workflows/ms.signalrservice.webpubsub.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.sql.managedinstances.yml b/.github/workflows/ms.sql.managedinstances.yml index dce975ea15..274d96b411 100644 --- a/.github/workflows/ms.sql.managedinstances.yml +++ b/.github/workflows/ms.sql.managedinstances.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.sql.servers.yml b/.github/workflows/ms.sql.servers.yml index b1f238bc6b..894ba06e2b 100644 --- a/.github/workflows/ms.sql.servers.yml +++ b/.github/workflows/ms.sql.servers.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 54324e76b6..a0b9d56307 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.synapse.privatelinkhubs.yml b/.github/workflows/ms.synapse.privatelinkhubs.yml index 18069ca0a9..e3803f9386 100644 --- a/.github/workflows/ms.synapse.privatelinkhubs.yml +++ b/.github/workflows/ms.synapse.privatelinkhubs.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.synapse.workspaces.yml b/.github/workflows/ms.synapse.workspaces.yml index d066d7022b..aa45d2a017 100644 --- a/.github/workflows/ms.synapse.workspaces.yml +++ b/.github/workflows/ms.synapse.workspaces.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml index 2e3ac0a4e7..35bfbc56b9 100644 --- a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml +++ b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.web.connections.yml b/.github/workflows/ms.web.connections.yml index f3e1be03b8..fb9601c78e 100644 --- a/.github/workflows/ms.web.connections.yml +++ b/.github/workflows/ms.web.connections.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.web.hostingenvironments.yml b/.github/workflows/ms.web.hostingenvironments.yml index 1e2e7ba524..9293cb196e 100644 --- a/.github/workflows/ms.web.hostingenvironments.yml +++ b/.github/workflows/ms.web.hostingenvironments.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.web.serverfarms.yml b/.github/workflows/ms.web.serverfarms.yml index 5146bad447..f51a96c509 100644 --- a/.github/workflows/ms.web.serverfarms.yml +++ b/.github/workflows/ms.web.serverfarms.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.web.sites.yml b/.github/workflows/ms.web.sites.yml index 9d15f63614..317cde4d3b 100644 --- a/.github/workflows/ms.web.sites.yml +++ b/.github/workflows/ms.web.sites.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/.github/workflows/ms.web.staticsites.yml b/.github/workflows/ms.web.staticsites.yml index 832d2336a8..476b88e2c1 100644 --- a/.github/workflows/ms.web.staticsites.yml +++ b/.github/workflows/ms.web.staticsites.yml @@ -145,3 +145,4 @@ jobs: bicepRegistryRGName: '${{ env.bicepRegistryRGName }}' bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}' bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}' + publishLatest: '${{ env.publishLatest }}' diff --git a/docs/wiki/Getting started - Scenario 1 Consume library.md b/docs/wiki/Getting started - Scenario 1 Consume library.md index 229a667770..566f2962b0 100644 --- a/docs/wiki/Getting started - Scenario 1 Consume library.md +++ b/docs/wiki/Getting started - Scenario 1 Consume library.md @@ -67,15 +67,15 @@ If you are not using a local repository, you'll also need to publish the modules
Modules publishing in Template Spec -The preferred method to publish modules to template-specs is to leverage CARML ready [CI environment](./The%20CI%20environment), however there maybe specific requirements for which this option is not applicable. As an alternative, the same [Publish-ModuleToTemplateSpec.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1) script leveraged by the publishing step of the CI environment pipeline can be executed locally. +The preferred method to publish modules to template-specs is to leverage CARML ready [CI environment](./The%20CI%20environment), however there maybe specific requirements for which this option is not applicable. As an alternative, the same [Publish-ModuleToTemplateSpecsRG.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1) script leveraged by the publishing step of the CI environment pipeline can be executed locally. To publish a module by running the script: 1. Let's suppose your updated library location is `'D:\ResourcesModules'`, open a Powershell session on your machine 1. Navigate to `'D:\ResourcesModules\utilities\pipelines\resourcePublish'` location - 1. Load the script `'Publish-ModuleToTemplateSpec.ps1'` executing: + 1. Load the script `'Publish-ModuleToTemplateSpecsRG.ps1'` executing: ```PowerShell - . .\Publish-ModuleToTemplateSpec.ps1 + . .\Publish-ModuleToTemplateSpecsRG.ps1 ``` 1. Run the script for the modules you need to publish, using the opportune parameters: - TemplateFilePath = the absolute path of the module to be published @@ -87,9 +87,9 @@ To publish a module by running the script: To publish the Keyvault module with version 0.4.740 on a Template Spec that will be created in the resource group 'artifact-rg' you can execute the following example: ```PowerShell - Publish-ModuleToTemplateSpec -TemplateFilePath "D:\ResourcesModules\modules\Microsoft.KeyVault\vaults\deploy.bicep" -ModuleVersion "0.4.740" -TemplateSpecsRgName 'artifact-rg' -TemplateSpecsRgLocation 'West Europe' -TemplateSpecsDescription 'CARML KV Template Spec' + Publish-ModuleToTemplateSpecsRG -TemplateFilePath "D:\ResourcesModules\modules\Microsoft.KeyVault\vaults\deploy.bicep" -ModuleVersion "0.4.740" -TemplateSpecsRgName 'artifact-rg' -TemplateSpecsRgLocation 'West Europe' -TemplateSpecsDescription 'CARML KV Template Spec' ``` - As the modules to be published are more than one a script that calls the `'Publish-ModuleToTemplateSpec'` function for each of the modules can be created. + As the modules to be published are more than one a script that calls the `'Publish-ModuleToTemplateSpecsRG'` function for each of the modules can be created. 1. Update your master template in order to use the new version of the published modules. @@ -132,15 +132,15 @@ To publish a module by running the script:
Modules publishing to Azure DevOps artifact feed -The preferred method to publish modules to Azure DevOps artifact feed is to leverage CARML ready [CI environment](./The%20CI%20environment), however there maybe specific requirements for which this option is not applicable. As an alternative, the same [Publish-ModuleToUniversalArtifactFeed.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactFeed.ps1) script leveraged by the publishing step of the CI environment pipeline can be executed locally. +The preferred method to publish modules to Azure DevOps artifact feed is to leverage CARML ready [CI environment](./The%20CI%20environment), however there maybe specific requirements for which this option is not applicable. As an alternative, the same [Publish-ModuleToUniversalArtifactsFeed.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactsFeed.ps1) script leveraged by the publishing step of the CI environment pipeline can be executed locally. To publish a module by running the script: 1. Let's suppose your updated library location is `'D:\ResourcesModules'`, open a Powershell session on your machine 1. Navigate to `'D:\ResourcesModules\utilities\pipelines\resourcePublish'` location - 1. Load the script `'Publish-ModuleToUniversalArtifactFeed.ps1'` executing: + 1. Load the script `'Publish-ModuleToUniversalArtifactsFeed.ps1'` executing: ```PowerShell - . .\Publish-ModuleToUniversalArtifactFeed.ps1 + . .\Publish-ModuleToUniversalArtifactsFeed.ps1 ``` 1. Run the script for the modules you need to publish, using the opportune parameters: - TemplateFilePath = the absolute path of the module to be published. @@ -152,9 +152,9 @@ To publish a module by running the script: To publish the Keyvault module with version 0.4.740 on an artifact feed called 'Artifacts', in the project 'IaC' on organization 'fabrikam' you can execute the following command: ```PowerShell - Publish-ModuleToUniversalArtifactFeed -TemplateFilePath "D:\ResourcesModules\modules\Microsoft.KeyVault\vaults\deploy.bicep" -ModuleVersion "0.4.740" -VstsOrganizationUri 'https://dev.azure.com/fabrikam' -VstsFeedProject 'IaC' -VstsFeedName 'Artifacts' + Publish-ModuleToUniversalArtifactsFeed -TemplateFilePath "D:\ResourcesModules\modules\Microsoft.KeyVault\vaults\deploy.bicep" -ModuleVersion "0.4.740" -VstsOrganizationUri 'https://dev.azure.com/fabrikam' -VstsFeedProject 'IaC' -VstsFeedName 'Artifacts' ``` - As the modules to be published are more than one a script that calls the `'Publish-ModuleToUniversalArtifactFeed'` function for each of the modules can be created. + As the modules to be published are more than one a script that calls the `'Publish-ModuleToUniversalArtifactsFeed'` function for each of the modules can be created. 1. Update your master template in order to use the new version of the published modules. diff --git a/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md b/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md index 1d2637456b..dd941c2347 100644 --- a/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md +++ b/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md @@ -329,7 +329,7 @@ The primary pipeline settings file ([`settings.yml`](https://github.com/Azure/Re | Variable Name | Example Value | Description | | - | - | - | -| `vstsFeedName` | `'ResourceModules'` | The name of the Azure DevOps universal packages feed to publish to. | +| `vstsFeedName` | `'carml'` | The name of the Azure DevOps universal packages feed to publish to. | | `vstsFeedProject` | `'$(System.TeamProject)'` | The project that hosts the feed. The feed must be created in Azure DevOps ahead of time. | | `vstsFeedToken` | `'$(System.AccessToken)'` | The token used to publish universal packages into the feed above. | | `artifactsFeedDoPublish` | `'true'` | A central switch to enable/disable publishing to Universal packages. | @@ -354,14 +354,16 @@ This section will explain what is required to publish the modules to [Azure Arti 1. An Azure DevOps organization and project 1. An Azure DevOps artifacts feed - > Note: The default feed name is `ResourceModules` as configured in the [`settings.yml`](https://github.com/Azure/ResourceModules/blob/main/settings.yml) file's variable `vstsFeedName`. Update the value here if you want to use a different name, but make sure it matches the name of the artifact feed created in Azure DevOps. + > **Note:** The official guidance to set up a feed can be found [here](https://learn.microsoft.com/en-us/azure/devops/artifacts/concepts/feeds?view=azure-devops#create-public-feeds). The default feed name is `carml` as configured in the [`settings.yml`](https://github.com/Azure/ResourceModules/blob/main/settings.yml) file's variable `vstsFeedName`. Update the value here if you want to use a different name, but make sure it matches the name of the artifact feed created in Azure DevOps. + > + > **Note:** It's also very important that the feed's 'Permissions' (Artifact Feed -> Feed settings -> Permissions) are set up so that the project's 'Build Service' has at least the role 'Contributor' to be able to publish artifacts ([ref](https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#permissions-table)). 1. An Azure DevOps project to host the artifact feed - > Note: There are a couple options to consider when setting up an Azure Artifact feed. For example, organization-scoped feeds vs project-scoped feeds. Please see what option suits your needs by reviewing the [feeds](https://docs.microsoft.com/en-us/azure/devops/artifacts/concepts/feeds?view=azure-devops) document first. + > **Note:** There are a couple options to consider when setting up an Azure Artifact feed. For example, organization-scoped feeds vs project-scoped feeds. Please see what option suits your needs by reviewing the [feeds](https://docs.microsoft.com/en-us/azure/devops/artifacts/concepts/feeds?view=azure-devops) document first. 1. If you chose the feed to be project-scoped, you will need the Project Build Service account to have `Contributor` access to publish to the Azure Artifacts feed. To set this, follow the [Pipeline permission](https://docs.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#pipelines-permissions) steps. #### Implementation Guidance -Each `./azuredevops/modulePipelines` YAML pipeline already calls [`/.azuredevops/pipelineTemplates/jobs.publishModule.yml`](https://github.com/Azure/ResourceModules/blob/main/.azuredevops/pipelineTemplates/jobs.publishModule.yml). This YAML template contains a method to `Publish module to artifacts feed` via [`utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1`](https://github.com/Azure/ResourceModules/blob/main/utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1). +Each `./azuredevops/modulePipelines` YAML pipeline already calls [`/.azuredevops/pipelineTemplates/jobs.publishModule.yml`](https://github.com/Azure/ResourceModules/blob/main/.azuredevops/pipelineTemplates/jobs.publishModule.yml). This YAML template contains a method to `Publish module to artifacts feed` via [`utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactsFeed.ps1`](https://github.com/Azure/ResourceModules/blob/main/utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactsFeed.ps1).
diff --git a/docs/wiki/Solution creation.md b/docs/wiki/Solution creation.md index 091490f18c..928b4ae77c 100644 --- a/docs/wiki/Solution creation.md +++ b/docs/wiki/Solution creation.md @@ -289,7 +289,7 @@ The example assumes you are using a [`bicepconfig.json`](https://docs.microsoft. The following example shows how you could orchestrate a deployment of multiple resources using template specs. In this example, we will deploy a resource group with a Network Security Group (NSG), and use them in a subsequent VNET deployment. -> **Note**: the preferred method to publish modules to template-specs is to leverage the [CI environment](./The%20CI%20environment) provided in this repository. However, this option may not be applicable to all scenarios (ref e.g., the [Consume library](./Getting%20started%20-%20Scenario%201%20Consume%20library) section). As an alternative, the same [Publish-ModuleToTemplateSpec.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpec.ps1) script leveraged by the publishing step of the CI environment pipeline can also be run locally. +> **Note**: the preferred method to publish modules to template-specs is to leverage the [CI environment](./The%20CI%20environment) provided in this repository. However, this option may not be applicable to all scenarios (ref e.g., the [Consume library](./Getting%20started%20-%20Scenario%201%20Consume%20library) section). As an alternative, the same [Publish-ModuleToTemplateSpecsRG.ps1](https://github.com/Azure/ResourceModules/blob/main/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpecsRG.ps1) script leveraged by the publishing step of the CI environment pipeline can also be run locally. ```bicep targetScope = 'subscription' diff --git a/settings.yml b/settings.yml index 73473ec5dd..429b307358 100644 --- a/settings.yml +++ b/settings.yml @@ -100,7 +100,7 @@ variables: # --------------------------- # artifactsFeedDoPublish: true # Set to true, if you would like to publish modules as Universal Packages (in Azure DevOps Artifacts) - vstsFeedName: 'ResourceModules' # The name of the Azure DevOps universal packages feed to publish to + vstsFeedName: 'carml' # The name of the Azure DevOps universal packages feed to publish to vstsFeedProject: '$(System.TeamProject)' # The project that hosts the feed vstsFeedToken: $(System.AccessToken) # The token used to publish universal packages into the feed above diff --git a/utilities/pipelines/resourcePublish/Get-ModulesMissingFromPrivateBicepRegistry.ps1 b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromPrivateBicepRegistry.ps1 new file mode 100644 index 0000000000..b4415ad09e --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromPrivateBicepRegistry.ps1 @@ -0,0 +1,133 @@ +<# +.SYNOPSIS +Get a list of all modules (path & version) in the given TemplatePath that do not exist as a repository in the given Container Registry + +.DESCRIPTION +Get a list of all modules (path & version) in the given TemplatePath that do not exist as a repository in the given Container Registry + +.PARAMETER TemplateFilePath +Mandatory. The Template File Path to process + +.PARAMETER BicepRegistryName +Mandatory. The name of the Container Registry to search in + +.PARAMETER BicepRegistryRgName +Mandatory. The name of Resource Group the Container Registry is located it. + +.PARAMETER PublishLatest +Optional. Publish an absolute latest version. +Note: This version may include breaking changes and is not recommended for production environments + +.EXAMPLE +Get-ModulesMissingFromPrivateBicepRegistry -TemplateFilePath 'C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\deploy.bicep' -BicepRegistryName 'adpsxxazacrx001' -BicepRegistryRgName 'artifacts-rg' + +Check if either the Virtual Machine module or any of its children (e.g. 'extension') is missing in the Container Registry 'adpsxxazacrx001' of Resource Group 'artifacts-rg' + +Returns for example: +Name Value +---- ----- +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\extensions\deploy.bicep +Version 0.4 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\extensions\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\extensions\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\extensions\deploy.bicep +Version 0.6.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\deploy.bicep +Version 0.6 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.Compute\virtualMachines\deploy.bicep +#> +function Get-ModulesMissingFromPrivateBicepRegistry { + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, + + [Parameter(Mandatory = $true)] + [string] $BicepRegistryName, + + [Parameter(Mandatory = $true)] + [string] $BicepRegistryRgName, + + [Parameter(Mandatory = $false)] + [bool] $PublishLatest = $true + ) + + begin { + Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load used functions + . (Join-Path $PSScriptRoot 'Get-PrivateRegistryRepositoryName.ps1') + } + + process { + # Get all children + $availableModuleTemplatePaths = (Get-ChildItem -Path (Split-Path $TemplateFilePath) -Recurse -Include @('deploy.bicep', 'deploy.json')).FullName + + if (-not (Get-AzContainerRegistry -Name $BicepRegistryName -ResourceGroupName $BicepRegistryRgName)) { + $missingTemplatePaths = $availableModuleTemplatePaths + } else { + # Test all children against ACR + $missingTemplatePaths = @() + foreach ($templatePath in $availableModuleTemplatePaths) { + + # Get a valid Container Registry name + $moduleRegistryIdentifier = Get-PrivateRegistryRepositoryName -TemplateFilePath $templatePath + + $null = Get-AzContainerRegistryTag -RepositoryName $moduleRegistryIdentifier -RegistryName $BicepRegistryName -ErrorAction 'SilentlyContinue' -ErrorVariable 'result' + + if ($result.exception.Response.StatusCode -eq 'NotFound') { + $missingTemplatePaths += $templatePath + } + } + } + + # Collect any that are not part of the ACR, fetch their version and return the result array + $modulesToPublish = @() + foreach ($missingTemplatePath in $missingTemplatePaths) { + $moduleVersionsToPublish = @( + # Patch version + @{ + TemplateFilePath = $missingTemplatePath + Version = '{0}.0' -f (Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version + }, + # Minor version + @{ + TemplateFilePath = $missingTemplatePath + Version = (Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version + }, + # Major version + @{ + TemplateFilePath = $missingTemplatePath + Version = ((Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version -split '\.')[0] + } + ) + if ($PublishLatest) { + $moduleVersionsToPublish += @{ + TemplateFilePath = $missingTemplatePath + Version = 'latest' + } + } + + $modulesToPublish += $moduleVersionsToPublish + Write-Verbose ('Missing module [{0}] will be considered for publishing with version(s) [{1}]' -f $missingTemplatePath, ($moduleVersionsToPublish.Version -join ', ')) -Verbose + } + + if ($moduleToPublish.count -eq 0) { + Write-Verbose 'No modules missing in the target environment' -Verbose + } + + return $modulesToPublish + } + + end { + Write-Debug ('{0} exited' -f $MyInvocation.MyCommand) + } +} diff --git a/utilities/pipelines/resourcePublish/Get-ModulesMissingFromTemplateSpecsRG.ps1 b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromTemplateSpecsRG.ps1 new file mode 100644 index 0000000000..cc78c17d96 --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromTemplateSpecsRG.ps1 @@ -0,0 +1,144 @@ +<# +.SYNOPSIS +Get a list of all modules (path & version) in the given TemplatePath that do not exist as a Template Spec in the given Resource Group + +.DESCRIPTION +Get a list of all modules (path & version) in the given TemplatePath that do not exist as a Template Spec in the given Resource Group + +.PARAMETER TemplateFilePath +Mandatory. The Template File Path to process + +.PARAMETER TemplateSpecsRGName +Mandatory. The Resource Group to search in + +.PARAMETER PublishLatest +Optional. Publish an absolute latest version. +Note: This version may include breaking changes and is not recommended for production environments + +.EXAMPLE +Get-ModulesMissingFromTemplateSpecsRG -TemplateFilePath 'C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep' -TemplateSpecsRGName 'artifacts-rg' + +Check if either the Key Vault module or any of its children (e.g. 'secret') is missing in the Resource Group 'artifacts-rg' + +Returns for example: +Name Value +---- ----- +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\accessPolicies\deploy.bicep +Version 0.4 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\accessPolicies\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\accessPolicies\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\accessPolicies\deploy.bicep +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\keys\deploy.bicep +Version 0.4 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\keys\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\keys\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\keys\deploy.bicep +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\secrets\deploy.bicep +Version 0.4 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\secrets\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\secrets\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\secrets\deploy.bicep +Version 0.5.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep +Version 0.5 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep +Version 0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep +Version latest +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep +#> +function Get-ModulesMissingFromTemplateSpecsRG { + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, + + [Parameter(Mandatory = $true)] + [string] $TemplateSpecsRGName, + + [Parameter(Mandatory = $false)] + [bool] $PublishLatest = $true + ) + + begin { + Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load used functions + . (Join-Path $PSScriptRoot 'Get-TemplateSpecsName.ps1') + } + + process { + # Get all children + $availableModuleTemplatePaths = (Get-ChildItem -Path (Split-Path $TemplateFilePath) -Recurse -Include @('deploy.bicep', 'deploy.json')).FullName + + if (-not (Get-AzResourceGroup -ResourceGroupName 'artifacts-rg')) { + $missingTemplatePaths = $availableModuleTemplatePaths + } else { + # Test all children against Resource Group + $missingTemplatePaths = @() + foreach ($templatePath in $availableModuleTemplatePaths) { + + # Get a valid Template Spec name + $templateSpecsIdentifier = Get-TemplateSpecsName -TemplateFilePath $templatePath + + $null = Get-AzTemplateSpec -ResourceGroupName $TemplateSpecsRGName -Name $templateSpecsIdentifier -ErrorAction 'SilentlyContinue' -ErrorVariable 'result' + + if ($result.exception.Response.StatusCode -eq 'NotFound') { + $missingTemplatePaths += $templatePath + } + } + } + + # Collect any that are not part of the ACR, fetch their version and return the result array + $modulesToPublish = @() + foreach ($missingTemplatePath in $missingTemplatePaths) { + $moduleVersionsToPublish = @( + # Patch version + @{ + TemplateFilePath = $missingTemplatePath + Version = '{0}.0' -f (Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version + }, + # Minor version + @{ + TemplateFilePath = $missingTemplatePath + Version = (Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version + }, + # Major version + @{ + TemplateFilePath = $missingTemplatePath + Version = ((Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version -split '\.')[0] + } + ) + if ($PublishLatest) { + $moduleVersionsToPublish += @{ + TemplateFilePath = $missingTemplatePath + Version = 'latest' + } + } + + $modulesToPublish += $moduleVersionsToPublish + Write-Verbose ('Missing module [{0}] will be considered for publishing with version(s) [{1}]' -f $missingTemplatePath, ($moduleVersionsToPublish.Version -join ', ')) -Verbose + } + + if ($moduleToPublish.count -eq 0) { + Write-Verbose 'No modules missing in the target environment' -Verbose + } + + return $modulesToPublish + } + + end { + Write-Debug ('{0} exited' -f $MyInvocation.MyCommand) + } +} + diff --git a/utilities/pipelines/resourcePublish/Get-ModulesMissingFromUniversalArtifactsFeed.ps1 b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromUniversalArtifactsFeed.ps1 new file mode 100644 index 0000000000..0f5a44fd9d --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-ModulesMissingFromUniversalArtifactsFeed.ps1 @@ -0,0 +1,125 @@ +<# +.SYNOPSIS +Get a list of all modules (path & version) in the given TemplatePath that do not exist as an Universal Package in the given Azure DevOps project & artifacts feed + +.DESCRIPTION +Get a list of all modules (path & version) in the given TemplatePath that do not exist as an Universal Package in the given Azure DevOps project & artifacts feed + +.PARAMETER TemplateFilePath +Mandatory. The Template File Path to process + +.PARAMETER VstsOrganizationUri +Mandatory. Azure DevOps organization URL hosting the artifacts feed. +Example: 'https://dev.azure.com/fabrikam/'. + +.PARAMETER VstsFeedProject +Optional. Name of the project hosting the artifacts feed. May be empty. +Example: 'IaC'. + +.PARAMETER VstsFeedName +Mandatory. Name to the feed to publish to. +Example: 'Artifacts'. + +.PARAMETER BearerToken +Optional. The bearer token to use to authenticate the request. If not provided it MUST be existing in your environment as `$env:TOKEN` + +.EXAMPLE +Get-ModulesMissingFromUniversalArtifactsFeed -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' -vstsOrganizationUri 'https://dev.azure.com/fabrikam' -VstsProject 'IaC' -VstsFeedName 'Artifacts' + +Check if either the Key Vault module or any of its children (e.g. 'secret') is missing in artifacts feed 'Artifacts' of Azure DevOps project 'https://dev.azure.com/fabrikam/IaC' + +Returns for example: +Name Value +---- ----- +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\accessPolicies\deploy.bicep +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\keys\deploy.bicep +Version 0.4.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\secrets\deploy.bicep +Version 0.5.0 +TemplateFilePath C:\ResourceModules\modules\Microsoft.KeyVault\vaults\deploy.bicep +#> +function Get-ModulesMissingFromUniversalArtifactsFeed { + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, + + [Parameter(Mandatory = $true)] + [string] $VstsFeedName, + + [Parameter(Mandatory = $true)] + [string] $VstsOrganizationUri, + + [Parameter(Mandatory = $false)] + [string] $VstsFeedProject = '', + + [Parameter(Mandatory = $false)] + [string] $BearerToken = $env:TOKEN + ) + + begin { + Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load used functions + . (Join-Path $PSScriptRoot 'Get-UniversalArtifactsName.ps1') + } + + process { + # Get all children + $availableModuleTemplatePaths = (Get-ChildItem -Path (Split-Path $TemplateFilePath) -Recurse -Include @('deploy.bicep', 'deploy.json')).FullName + + # Get artifacts + if ($VstsOrganizationUri -like '*/') { + $VstsOrganizationUri = $VstsOrganizationUri.Substring(0, ($VstsOrganizationUri.length - 1)) # Remove tailing slash if any + } + $VstsOrganization = Split-Path $VstsOrganizationUri -Leaf # Extract only organization name + + $modulesInputObject = @{ + Method = 'Get' + Headers = @{ + # Authorization = "Basic $BearerToken" # For custom PAT + Authorization = "Bearer $BearerToken" # For pipeline PAT + } + Uri = "https://feeds.dev.azure.com/$VstsOrganization/$VstsFeedProject/_apis/packaging/Feeds/$VstsFeedName/Packages?api-version=6.0-preview" + } + + $publishedModules = Invoke-RestMethod @modulesInputObject + $publishedModules = $publishedModules.value.name # Reduce down to the name + + # Test all children against Universal Artifacts feed + $missingTemplatePaths = @() + foreach ($templatePath in $availableModuleTemplatePaths) { + + # Get a valid Universal Artifact name + $artifactsIdentifier = Get-UniversalArtifactsName -TemplateFilePath $templatePath + + if ($publishedModules -notcontains $artifactsIdentifier) { + $missingTemplatePaths += $templatePath + } + } + + # Collect any that are not part of the ACR, fetch their version and return the result array + $modulesToPublish = @() + foreach ($missingTemplatePath in $missingTemplatePaths) { + $moduleToPublish = @{ + TemplateFilePath = $missingTemplatePath + Version = '{0}.0' -f (Get-Content (Join-Path (Split-Path $missingTemplatePath) 'version.json') -Raw | ConvertFrom-Json).version + } + $modulesToPublish += $moduleToPublish + Write-Verbose ('Missing module [{0}] will be considered for publishing with version [{1}]' -f $modulesToPublish.TemplateFilePath, $modulesToPublish.Version) -Verbose + } + + if ($moduleToPublish.count -eq 0) { + Write-Verbose 'No modules missing in the target environment' -Verbose + } + + return $modulesToPublish + } + + end { + Write-Debug ('{0} exited' -f $MyInvocation.MyCommand) + } +} diff --git a/utilities/pipelines/resourcePublish/Get-ModulesToPublish.ps1 b/utilities/pipelines/resourcePublish/Get-ModulesToPublish.ps1 index 2d53d61ba9..4ee0f44179 100644 --- a/utilities/pipelines/resourcePublish/Get-ModulesToPublish.ps1 +++ b/utilities/pipelines/resourcePublish/Get-ModulesToPublish.ps1 @@ -380,11 +380,11 @@ function Get-ModulesToPublish { $ModuleFolderPath = Split-Path $TemplateFilePath -Parent $TemplateFilesToPublish = Get-TemplateFileToPublish -ModuleFolderPath $ModuleFolderPath | Sort-Object FullName -Descending - $ModulesToPublish = [System.Collections.ArrayList]@() + $modulesToPublish = [System.Collections.ArrayList]@() foreach ($TemplateFileToPublish in $TemplateFilesToPublish) { $ModuleVersion = Get-NewModuleVersion -TemplateFilePath $TemplateFileToPublish.FullName -Verbose - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = $ModuleVersion TemplateFilePath = $TemplateFileToPublish.FullName } @@ -392,20 +392,20 @@ function Get-ModulesToPublish { if ($ModuleVersion -notmatch 'prerelease') { # Latest Major,Minor - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = ($ModuleVersion.Split('.')[0..1] -join '.') TemplateFilePath = $TemplateFileToPublish.FullName } # Latest Major - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = ($ModuleVersion.Split('.')[0]) TemplateFilePath = $TemplateFileToPublish.FullName } if ($PublishLatest) { # Absolute latest - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = 'latest' TemplateFilePath = $TemplateFileToPublish.FullName } @@ -416,7 +416,7 @@ function Get-ModulesToPublish { foreach ($ParentTemplateFileToPublish in $ParentTemplateFilesToPublish) { $ParentModuleVersion = Get-NewModuleVersion -TemplateFilePath $ParentTemplateFileToPublish.FullName - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = $ParentModuleVersion TemplateFilePath = $ParentTemplateFileToPublish.FullName } @@ -424,20 +424,20 @@ function Get-ModulesToPublish { if ($ModuleVersion -notmatch 'prerelease') { # Latest Major,Minor - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = ($ParentModuleVersion.Split('.')[0..1] -join '.') TemplateFilePath = $ParentTemplateFileToPublish.FullName } # Latest Major - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = ($ParentModuleVersion.Split('.')[0]) TemplateFilePath = $ParentTemplateFileToPublish.FullName } if ($PublishLatest) { # Absolute latest - $ModulesToPublish += @{ + $modulesToPublish += @{ Version = 'latest' TemplateFilePath = $ParentTemplateFileToPublish.FullName } @@ -446,18 +446,18 @@ function Get-ModulesToPublish { } } - $ModulesToPublish = $ModulesToPublish | Sort-Object TemplateFilePath, Version -Descending -Unique + $modulesToPublish = $modulesToPublish | Sort-Object TemplateFilePath, Version -Descending -Unique - if ($ModulesToPublish.count -gt 0) { + if ($modulesToPublish.count -gt 0) { Write-Verbose 'Publish the following modules:'-Verbose - $ModulesToPublish | ForEach-Object { + $modulesToPublish | ForEach-Object { $RelPath = ($_.TemplateFilePath).Split('/modules/')[-1] $RelPath = $RelPath.Split('/deploy.')[0] Write-Verbose (' - [{0}] [{1}] ' -f $RelPath, $_.Version) -Verbose } } else { - Write-Verbose 'No modules to publish.'-Verbose + Write-Verbose 'No modules with changes found to publish.'-Verbose } - return $ModulesToPublish + return $modulesToPublish } diff --git a/utilities/pipelines/resourcePublish/Get-PrivateRegistryRepositoryName.ps1 b/utilities/pipelines/resourcePublish/Get-PrivateRegistryRepositoryName.ps1 new file mode 100644 index 0000000000..876663c119 --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-PrivateRegistryRepositoryName.ps1 @@ -0,0 +1,28 @@ +<# +.SYNOPSIS +Convert the given template file path into a valid Container Registry repository name + +.DESCRIPTION +Convert the given template file path into a valid Container Registry repository name + +.PARAMETER TemplateFilePath +Mandatory. The template file path to convert + +.EXAMPLE +Get-PrivateRegistryRepositoryName -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' + +Convert 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' to e.g. 'bicep/modules/microsoft.keyvault.vaults' +#> +function Get-PrivateRegistryRepositoryName { + + [CmdletBinding()] + param ( + [Parameter(Mandatory)] + [string] $TemplateFilePath + ) + + $moduleIdentifier = (Split-Path $TemplateFilePath -Parent).Replace('\', '/').Split('/modules/')[1] + $moduleRegistryIdentifier = 'bicep/modules/{0}' -f $moduleIdentifier.Replace('\', '/').Replace('/', '.').ToLower() + + return $moduleRegistryIdentifier +} diff --git a/utilities/pipelines/resourcePublish/Get-TemplateSpecsName.ps1 b/utilities/pipelines/resourcePublish/Get-TemplateSpecsName.ps1 new file mode 100644 index 0000000000..5048d5dc75 --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-TemplateSpecsName.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS +Convert the given template file path into a valid Template Specs name + +.DESCRIPTION +Convert the given template file path into a valid Template Specs repository name + +.PARAMETER TemplateFilePath +Mandatory. The template file path to convert + +.EXAMPLE +Get-TemplateSpecsName -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' + +Convert 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' to e.g. 'microsoft.keyvault.vaults' +#> +function Get-TemplateSpecsName { + + [CmdletBinding()] + param ( + [Parameter(Mandatory)] + [string] $TemplateFilePath + ) + + $moduleIdentifier = (Split-Path $TemplateFilePath -Parent).Replace('\', '/').Split('/modules/')[1] + $templateSpecIdentifier = $moduleIdentifier.Replace('\', '/').Replace('/', '.').ToLower() + + + return $templateSpecIdentifier +} diff --git a/utilities/pipelines/resourcePublish/Get-UniversalArtifactsName.ps1 b/utilities/pipelines/resourcePublish/Get-UniversalArtifactsName.ps1 new file mode 100644 index 0000000000..34b8d43d8d --- /dev/null +++ b/utilities/pipelines/resourcePublish/Get-UniversalArtifactsName.ps1 @@ -0,0 +1,30 @@ +<# +.SYNOPSIS +Convert the given template file path into a valid Universal Artifact name + +.DESCRIPTION +Convert the given template file path into a valid Universal Artifact repository name +Must be lowercase alphanumerics, dashes, dots or underscores, under 256 characters. + +.PARAMETER TemplateFilePath +Mandatory. The template file path to convert + +.EXAMPLE +Get-UniversalArtifactsName -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' + +Convert 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' to e.g. 'microsoft.keyvault.vaults' +#> +function Get-UniversalArtifactsName { + + [CmdletBinding()] + param ( + [Parameter(Mandatory)] + [string] $TemplateFilePath + ) + + $ModuleFolderPath = Split-Path $TemplateFilePath -Parent + $universalPackageModuleName = $ModuleFolderPath.Replace('\', '/').Split('/modules/')[1] + $universalPackageModuleName = ($universalPackageModuleName.Replace('\', '.').Replace('/', '.').toLower() -Replace '[^a-z0-9\.\-_]')[0..255] -join '' + + return $universalPackageModuleName +} diff --git a/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1 b/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1 index 319c73b919..11cfddc7a5 100644 --- a/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1 +++ b/utilities/pipelines/resourcePublish/Publish-ModuleToPrivateBicepRegistry.ps1 @@ -52,6 +52,9 @@ function Publish-ModuleToPrivateBicepRegistry { begin { Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load used functions + . (Join-Path $PSScriptRoot 'Get-PrivateRegistryRepositoryName.ps1') } process { @@ -76,9 +79,8 @@ function Publish-ModuleToPrivateBicepRegistry { } } - # Extracts Microsoft.KeyVault/vaults from e.g. C:\modules\Microsoft.KeyVault\vaults\deploy.bicep - $moduleIdentifier = (Split-Path $TemplateFilePath -Parent).Replace('\', '/').Split('/modules/')[1] - $moduleRegistryIdentifier = 'bicep/modules/{0}' -f $moduleIdentifier.Replace('\', '/').Replace('/', '.').ToLower() + # Get a valid Container Registry name + $moduleRegistryIdentifier = Get-PrivateRegistryRepositoryName -TemplateFilePath $TemplateFilePath ############################################# ## Publish to private bicep registry ## diff --git a/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpec.ps1 b/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpecsRG.ps1 similarity index 84% rename from utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpec.ps1 rename to utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpecsRG.ps1 index df821bd8d8..9f047be260 100644 --- a/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpec.ps1 +++ b/utilities/pipelines/resourcePublish/Publish-ModuleToTemplateSpecsRG.ps1 @@ -27,11 +27,11 @@ Mandatory. The description of the parent template spec. Example: 'iacs key vault' .EXAMPLE -Publish-ModuleToTemplateSpec -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' -ModuleVersion '3.0.0-alpha' -TemplateSpecsRgName 'artifacts-rg' -TemplateSpecsRgLocation 'West Europe' -TemplateSpecsDescription 'iacs key vault' +Publish-ModuleToTemplateSpecsRG -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' -ModuleVersion '3.0.0-alpha' -TemplateSpecsRgName 'artifacts-rg' -TemplateSpecsRgLocation 'West Europe' -TemplateSpecsDescription 'iacs key vault' Try to publish the KeyVault module with version 3.0.0-alpha to a template spec in resource group 'artifacts-rg'. #> -function Publish-ModuleToTemplateSpec { +function Publish-ModuleToTemplateSpecsRG { [CmdletBinding(SupportsShouldProcess)] param ( @@ -53,12 +53,12 @@ function Publish-ModuleToTemplateSpec { begin { Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load helper functions + . (Join-Path $PSScriptRoot 'Get-TemplateSpecsName.ps1') } process { - $moduleIdentifier = (Split-Path $TemplateFilePath -Parent).Replace('\', '/').Split('/modules/')[1] - $templateSpecIdentifier = $moduleIdentifier.Replace('\', '/').Replace('/', '.').ToLower() - ############################# ## EVALUATE RESOURCES ## ############################# @@ -68,6 +68,9 @@ function Publish-ModuleToTemplateSpec { } } + # Get a valid Template Specs name + $templateSpecIdentifier = Get-TemplateSpecsName -TemplateFilePath $TemplateFilePath + ################################ ## Create template spec ## ################################ diff --git a/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactFeed.ps1 b/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactsFeed.ps1 similarity index 83% rename from utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactFeed.ps1 rename to utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactsFeed.ps1 index 0dd3549f87..09d8fe7b66 100644 --- a/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactFeed.ps1 +++ b/utilities/pipelines/resourcePublish/Publish-ModuleToUniversalArtifactsFeed.ps1 @@ -60,11 +60,11 @@ Example: 'Artifacts'. Optional. The bearer token to use to authenticate the request. If not provided it MUST be existing in your environment as `$env:TOKEN` .EXAMPLE -Publish-ModuleToUniversalArtifactFeed -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' -ModuleVersion '3.0.0-alpha' -vstsOrganizationUri 'https://dev.azure.com/fabrikam' -VstsProject 'IaC' -VstsFeedName 'Artifacts' +Publish-ModuleToUniversalArtifactsFeed -TemplateFilePath 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' -ModuleVersion '3.0.0-alpha' -vstsOrganizationUri 'https://dev.azure.com/fabrikam' -VstsProject 'IaC' -VstsFeedName 'Artifacts' Try to publish the KeyVault module with version 3.0.0-alpha to a Universal Package Feed called 'Artifacts' under the project 'IaC'. #> -function Publish-ModuleToUniversalArtifactFeed { +function Publish-ModuleToUniversalArtifactsFeed { [CmdletBinding(SupportsShouldProcess)] param ( @@ -89,6 +89,9 @@ function Publish-ModuleToUniversalArtifactFeed { begin { Write-Debug ('{0} entered' -f $MyInvocation.MyCommand) + + # Load helper functions + . (Join-Path $PSScriptRoot 'Get-UniversalArtifactsName.ps1') } process { @@ -100,13 +103,7 @@ function Publish-ModuleToUniversalArtifactFeed { ################################# ## Generate package name ## ################################# - - # Universal package names => lowercase alphanumerics, dashes, dots or underscores, under 256 characters. - # 'C:\modules\Microsoft.KeyVault\vaults\deploy.bicep' => 'microsoft.keyvault.vaults' - $ModuleFolderPath = Split-Path $TemplateFilePath -Parent - $universalPackageModuleName = $ModuleFolderPath.Replace('\', '/').Split('/modules/')[1] - $universalPackageModuleName = ($universalPackageModuleName.Replace('\', '.').Replace('/', '.').toLower() -Replace '[^a-z0-9\.\-_]')[0..255] -join '' - Write-Verbose "The universal package name is [$universalPackageModuleName]" -Verbose + $universalPackageModuleName = Get-UniversalArtifactsName -TemplateFilePath $TemplateFilePath ########################### ## Find feed scope ## @@ -129,7 +126,7 @@ function Publish-ModuleToUniversalArtifactFeed { '--scope', "$feedScope", '--name', "$universalPackageModuleName", '--version', "$ModuleVersion", - '--path', "$ModuleFolderPath", + '--path', "$TemplateFilePath", '--description', "$universalPackageModuleName Module", '--verbose' )