@@ -220,36 +220,43 @@ extends:
220220 - download : current
221221 displayName : Download artifacts
222222 - task : CopyFiles@2
223- SourceFolder : $(drop)
224- Contents : Microsoft.PowerShell.SecretManagement.$(version).nupkg
225- TargetFolder : $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
223+ inputs :
224+ SourceFolder : $(drop)
225+ Contents : Microsoft.PowerShell.SecretManagement.$(version).nupkg
226+ TargetFolder : $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
226227 - task : ArchiveFiles@2
227228 inputs :
228229 rootFolderOrFile : $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run
229230 includeRootFolder : false
230231 archiveType : tar
231- tarCompression : None
232+ tarCompression : none
232233 archiveFile : $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run.tar
234+ verbose : true
233235 displayName : Compress Run script into tar file as needed for EV2 Shell extension
234236 - pwsh : |
235237 $pathToJsonFile = '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SecretManagementToACR.Rollout.json'
236238 $content = Get-Content -Path $pathToJsonFile | ConvertFrom-Json
237239
238240 $environmentVariables = @()
239241
240- $environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_NAME", value='$(acr_name)'}
241- $environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_URI", value='$(acr_uri)'}
242- $environmentVariables += [PSCustomObject]@{name="MI_NAME", value='$(managed_identity_name)'}
243- $environmentVariables += [PSCustomObject]@{name="MI_CLIENTID", value='$(managed_identity_clientid)'}
244- $environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_VERSION", value='$(version)'}
245- $environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_MODULE", reference=[PSCustomObject]@{path="SrcFiles\\Microsoft.PowerShell.SecretManagement.$(version).nupkg"}' }
242+ $environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_NAME"; value='$(acr_name)'}
243+ $environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_URI"; value='$(acr_uri)'}
244+ $environmentVariables += [PSCustomObject]@{name="MI_NAME"; value='$(managed_identity_name)'}
245+ $environmentVariables += [PSCustomObject]@{name="MI_CLIENTID"; value='$(managed_identity_clientid)'}
246+ $environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_VERSION"; value='$(version)'}
247+ $environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_MODULE"; reference=[PSCustomObject]@{path="SrcFiles\\Microsoft.PowerShell.SecretManagement.$(version).nupkg"}}
246248
247249 $content.shellExtensions.launch.environmentVariables = $environmentVariables
248250
249251 $identityString = "/subscriptions/$(acr_subscription)/resourcegroups/$(acr_resource_group)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$(managed_identity_name)"
250252 $content.shellExtensions.launch.identity.userAssignedIdentities[0] = $identityString
251253
252254 Remove-Item -Path $pathToJsonFile
255+
256+ $json = $content | ConvertTo-Json -Depth 6
257+
258+ Write-Verbose -Verbose $json
259+
253260 $content | ConvertTo-Json -Depth 6 | Out-File $pathToJsonFile
254261 displayName: 'Replace values in SecretManagementToACR.Rollout.json file'
255262 - pwsh : |
0 commit comments