Skip to content

Commit 0960892

Browse files
committed
change back to install rust first, add tracing to config.toml
1 parent 9eec202 commit 0960892

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

.pipelines/DSC-Official.yml

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ 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
119128
- task: AzureCLI@2
120129
inputs:
121130
azureSubscription: az-PowerShell-feed-ingestion
@@ -134,15 +143,6 @@ extends:
134143
displayName: 'Get Azure DevOps Token'
135144
env:
136145
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"
@@ -284,11 +284,6 @@ extends:
284284
Write-Host "Use 'powershell' CFS"
285285
Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'
286286
Add-Content -Path "./.cargo/config.toml" -Value 'replace-with = "powershell"'
287-
Add-Content -Path "./.cargo/config.toml" -Value '[registry]'
288-
Add-Content -Path "./.cargo/config.toml" -Value 'global-credential-provider = ["cargo:token"]'
289-
290-
$env:CARGO_HTTP_DEBUG=true
291-
$env:CARGO_LOG='network=trace'
292287
293288
./build.ps1 -Release -Architecture x86_64-unknown-linux-gnu
294289
./build.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-gnu -Release
@@ -306,6 +301,15 @@ extends:
306301
type: linux
307302
hostArchitecture: arm64
308303
steps:
304+
- task: RustInstaller@1
305+
inputs:
306+
rustVersion: ms-stable
307+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
308+
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
309+
additionalTargets: aarch64-unknown-linux-gnu
310+
displayName: Install Rust
311+
env:
312+
ob_restore_phase: true
309313
- task: AzureCLI@2
310314
inputs:
311315
azureSubscription: az-PowerShell-feed-ingestion
@@ -324,15 +328,6 @@ extends:
324328
displayName: 'Get Azure DevOps Token'
325329
env:
326330
ob_restore_phase: true
327-
- task: RustInstaller@1
328-
inputs:
329-
rustVersion: ms-stable
330-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
331-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
332-
additionalTargets: aarch64-unknown-linux-gnu
333-
displayName: Install Rust
334-
env:
335-
ob_restore_phase: true
336331
- pwsh: |
337332
Write-Host "Use 'powershell' CFS"
338333
Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'
@@ -361,6 +356,15 @@ extends:
361356
macOS arm64:
362357
buildName: aarch64-apple-darwin
363358
steps:
359+
- task: RustInstaller@1
360+
inputs:
361+
rustVersion: ms-stable
362+
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
363+
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
364+
additionalTargets: $(buildName)
365+
displayName: Install Rust
366+
env:
367+
ob_restore_phase: true
364368
- task: AzureCLI@2
365369
inputs:
366370
azureSubscription: az-PowerShell-feed-ingestion
@@ -379,19 +383,18 @@ extends:
379383
displayName: 'Get Azure DevOps Token'
380384
env:
381385
ob_restore_phase: true
382-
- task: RustInstaller@1
383-
inputs:
384-
rustVersion: ms-stable
385-
toolchainFeed: https://pkgs.dev.azure.com/mscodehub/Rust/_packaging/Rust/nuget/v3/index.json
386-
#cratesIoFeedOverride: sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/
387-
additionalTargets: $(buildName)
388-
displayName: Install Rust
389-
env:
390-
ob_restore_phase: true
391386
- pwsh: |
392387
Write-Host "Use 'powershell' CFS"
393388
Add-Content -Path "./.cargo/config.toml" -Value '[source.crates-io]'
394389
Add-Content -Path "./.cargo/config.toml" -Value 'replace-with = "powershell"'
390+
Add-Content -Path "./.cargo/config.toml" -Value '[registry]'
391+
Add-Content -Path "./.cargo/config.toml" -Value 'global-credential-provider = ["cargo:token"]'
392+
393+
$c = get-content "./.cargo/config.toml" | Out-String
394+
Write-Host $c
395+
396+
$env:CARGO_HTTP_DEBUG=true
397+
$env:CARGO_LOG='network=trace'
395398
./build.ps1 -Release -Architecture $(buildName)
396399
./build.ps1 -PackageType tgz -Architecture $(buildName) -Release
397400
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"

0 commit comments

Comments
 (0)