Skip to content

Commit 956b858

Browse files
Merge pull request #584 from microsoft/psl-addcretedbyparaminyml
fix: Adding a hardcoded createdBy parameter to the deploy-KMGeneric.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file.
2 parents 0422e20 + 0d68451 commit 956b858

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
az deployment group create \
121121
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
122122
--template-file infra/main.bicep \
123-
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 aiDeploymentsLocation="${{ env.AZURE_LOCATION }}"
123+
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 aiDeploymentsLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline"
124124
125125
126126

infra/main.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,16 @@ var solutionSuffix = toLower(trim(replace(
106106
'*',
107107
''
108108
)))
109-
var deployerInfo = deployer()
109+
@description('Optional created by user name')
110+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
110111
// ========== Resource Group Tag ========== //
111112
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
112113
name: 'default'
113114
properties: {
114115
tags: {
115116
... tags
116117
TemplateName: 'KM Generic'
117-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
118+
CreatedBy: createdBy
118119
}
119120
}
120121
}

0 commit comments

Comments
 (0)