Skip to content

Commit ffe015a

Browse files
vthiebaut10andyleejordan
authored andcommitted
fix bugs and typos
1 parent 54110a6 commit ffe015a

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.pipelines/SecretManagement-Official.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,36 +217,43 @@ extends:
217217
- download: current
218218
displayName: Download artifacts
219219
- task: CopyFiles@2
220-
SourceFolder: $(drop)
221-
Contents: Microsoft.PowerShell.SecretManagement.$(version).nupkg
222-
TargetFolder: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
220+
inputs:
221+
SourceFolder: $(drop)
222+
Contents: Microsoft.PowerShell.SecretManagement.$(version).nupkg
223+
TargetFolder: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
223224
- task: ArchiveFiles@2
224225
inputs:
225226
rootFolderOrFile: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run
226227
includeRootFolder: false
227228
archiveType: tar
228-
tarCompression: None
229+
tarCompression: none
229230
archiveFile: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run.tar
231+
verbose: true
230232
displayName: Compress Run script into tar file as needed for EV2 Shell extension
231233
- pwsh: |
232234
$pathToJsonFile = '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SecretManagementToACR.Rollout.json'
233235
$content = Get-Content -Path $pathToJsonFile | ConvertFrom-Json
234236
235237
$environmentVariables = @()
236238
237-
$environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_NAME", value='$(acr_name)'}
238-
$environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_URI", value='$(acr_uri)'}
239-
$environmentVariables += [PSCustomObject]@{name="MI_NAME", value='$(managed_identity_name)'}
240-
$environmentVariables += [PSCustomObject]@{name="MI_CLIENTID", value='$(managed_identity_clientid)'}
241-
$environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_VERSION", value='$(version)'}
242-
$environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_MODULE", reference=[PSCustomObject]@{path="SrcFiles\\Microsoft.PowerShell.SecretManagement.$(version).nupkg"}'}
239+
$environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_NAME"; value='$(acr_name)'}
240+
$environmentVariables += [PSCustomObject]@{name="DESTINATION_ACR_URI"; value='$(acr_uri)'}
241+
$environmentVariables += [PSCustomObject]@{name="MI_NAME"; value='$(managed_identity_name)'}
242+
$environmentVariables += [PSCustomObject]@{name="MI_CLIENTID"; value='$(managed_identity_clientid)'}
243+
$environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_VERSION"; value='$(version)'}
244+
$environmentVariables += [PSCustomObject]@{name="SECRET_MANAGEMENT_MODULE"; reference=[PSCustomObject]@{path="SrcFiles\\Microsoft.PowerShell.SecretManagement.$(version).nupkg"}}
243245
244246
$content.shellExtensions.launch.environmentVariables = $environmentVariables
245247
246248
$identityString = "/subscriptions/$(acr_subscription)/resourcegroups/$(acr_resource_group)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$(managed_identity_name)"
247249
$content.shellExtensions.launch.identity.userAssignedIdentities[0] = $identityString
248250
249251
Remove-Item -Path $pathToJsonFile
252+
253+
$json = $content | ConvertTo-Json -Depth 6
254+
255+
Write-Verbose -Verbose $json
256+
250257
$content | ConvertTo-Json -Depth 6 | Out-File $pathToJsonFile
251258
displayName: 'Replace values in SecretManagementToACR.Rollout.json file'
252259
- pwsh: |

0 commit comments

Comments
 (0)