Skip to content

Commit 4833b04

Browse files
Adding a hardcoded createdBy parameter to the RAdeploy.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file. (#660)
1 parent 2d4bb88 commit 4833b04

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/RAdeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
az deployment group create \
105105
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
106106
--template-file infra/bicep/main.bicep \
107-
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }}
107+
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} createdBy="Pipeline"
108108
- name: List KeyVaults and Store in Array
109109
id: list_keyvaults
110110
run: |

infra/bicep/main.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ var subscriptionId = subscription().subscriptionId
1616
var solutionLocation = resourceGroupLocation
1717
var baseUrl = 'https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/byoc-researcher/'
1818

19-
var deployerInfo = deployer()
19+
@description('Optional created by user name')
20+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
2021
// ========== Resource Group Tag ========== //
2122
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
2223
name: 'default'
2324
properties: {
2425
tags: {
2526
TemplateName: 'Research Assistant'
26-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
27+
CreatedBy: createdBy
2728
}
2829
}
2930
}

0 commit comments

Comments
 (0)