Skip to content

Commit 7bf8b9f

Browse files
committed
move getting token before installing rust
1 parent 45b0945 commit 7bf8b9f

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

.pipelines/DSC-Official.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,6 @@ extends:
116116
displayName: 🛠️ Workaround for the LoadLibrary ACCESS_VIOLATION OneBranch issue
117117
env:
118118
ob_restore_phase: true
119-
- task: RustInstaller@1
120-
inputs:
121-
rustVersion: ms-stable
122-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
123-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
124-
additionalTargets: $(buildName)
125-
displayName: Install Rust
126-
env:
127-
ob_restore_phase: true
128119
- task: AzureCLI@2
129120
inputs:
130121
azureSubscription: az-PowerShell-feed-ingestion
@@ -136,13 +127,22 @@ extends:
136127
# Set the access token as a secret, so it doesn't get leaked in the logs
137128
Write-Host "##vso[task.setsecret]$accessToken"
138129
$header = "Bearer $accessToken"
139-
#Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
130+
Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
140131
141132
$credentialProvider = "cargo:token"
142-
#Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
133+
Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
143134
displayName: 'Get Azure DevOps Token'
144135
env:
145136
ob_restore_phase: true
137+
- task: RustInstaller@1
138+
inputs:
139+
rustVersion: ms-stable
140+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
141+
cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
142+
additionalTargets: $(buildName)
143+
displayName: Install Rust
144+
env:
145+
ob_restore_phase: true
146146
- pwsh: |
147147
Set-Location "$(Build.SourcesDirectory)/DSC"
148148
Write-Host "Use 'powershell' CFS"
@@ -253,15 +253,6 @@ extends:
253253
pool:
254254
type: linux
255255
steps:
256-
- task: RustInstaller@1
257-
inputs:
258-
rustVersion: ms-stable
259-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
260-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
261-
additionalTargets: x86_64-unknown-linux-gnu
262-
displayName: Install Rust
263-
env:
264-
ob_restore_phase: true
265256
- task: AzureCLI@2
266257
inputs:
267258
azureSubscription: az-PowerShell-feed-ingestion
@@ -273,13 +264,22 @@ extends:
273264
# Set the access token as a secret, so it doesn't get leaked in the logs
274265
Write-Host "##vso[task.setsecret]$accessToken"
275266
$header = "Bearer $accessToken"
276-
#Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
267+
Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
277268
278269
$credentialProvider = "cargo:token"
279-
#Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
270+
Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
280271
displayName: 'Get Azure DevOps Token'
281272
env:
282273
ob_restore_phase: true
274+
- task: RustInstaller@1
275+
inputs:
276+
rustVersion: ms-stable
277+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
278+
cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
279+
additionalTargets: x86_64-unknown-linux-gnu
280+
displayName: Install Rust
281+
env:
282+
ob_restore_phase: true
283283
- pwsh: |
284284
Write-Host "Use 'powershell' CFS"
285285
#Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'
@@ -300,15 +300,6 @@ extends:
300300
type: linux
301301
hostArchitecture: arm64
302302
steps:
303-
- task: RustInstaller@1
304-
inputs:
305-
rustVersion: ms-stable
306-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
307-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
308-
additionalTargets: aarch64-unknown-linux-gnu
309-
displayName: Install Rust
310-
env:
311-
ob_restore_phase: true
312303
- task: AzureCLI@2
313304
inputs:
314305
azureSubscription: az-PowerShell-feed-ingestion
@@ -320,13 +311,22 @@ extends:
320311
# Set the access token as a secret, so it doesn't get leaked in the logs
321312
Write-Host "##vso[task.setsecret]$accessToken"
322313
$header = "Bearer $accessToken"
323-
#Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
314+
Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
324315
325316
$credentialProvider = "cargo:token"
326-
#Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
317+
Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
327318
displayName: 'Get Azure DevOps Token'
328319
env:
329320
ob_restore_phase: true
321+
- task: RustInstaller@1
322+
inputs:
323+
rustVersion: ms-stable
324+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
325+
cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
326+
additionalTargets: aarch64-unknown-linux-gnu
327+
displayName: Install Rust
328+
env:
329+
ob_restore_phase: true
330330
- pwsh: |
331331
Write-Host "Use 'powershell' CFS"
332332
#Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'
@@ -355,15 +355,6 @@ extends:
355355
macOS arm64:
356356
buildName: aarch64-apple-darwin
357357
steps:
358-
- task: RustInstaller@1
359-
inputs:
360-
rustVersion: ms-stable
361-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
362-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
363-
additionalTargets: $(buildName)
364-
displayName: Install Rust
365-
env:
366-
ob_restore_phase: true
367358
- task: AzureCLI@2
368359
inputs:
369360
azureSubscription: az-PowerShell-feed-ingestion
@@ -375,13 +366,22 @@ extends:
375366
# Set the access token as a secret, so it doesn't get leaked in the logs
376367
Write-Host "##vso[task.setsecret]$accessToken"
377368
$header = "Bearer $accessToken"
378-
#Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
369+
Write-Host "##vso[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_TOKEN]$header"
379370
380371
$credentialProvider = "cargo:token"
381-
#Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
372+
Write-Host "##[task.setvariable variable=CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER]$credentialProvider"
382373
displayName: 'Get Azure DevOps Token'
383374
env:
384375
ob_restore_phase: true
376+
- task: RustInstaller@1
377+
inputs:
378+
rustVersion: ms-stable
379+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
380+
cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
381+
additionalTargets: $(buildName)
382+
displayName: Install Rust
383+
env:
384+
ob_restore_phase: true
385385
- pwsh: |
386386
Write-Host "Use 'powershell' CFS"
387387
#Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'

0 commit comments

Comments
 (0)