|
1 | 1 | parameters: |
2 | | -# Required parameters from generate-job-matrix.yml |
3 | | -- name: UsePlatformContainer |
4 | | - type: boolean |
5 | | -- name: OSName |
6 | | - type: string |
7 | | -- name: Matrix |
8 | | - type: object |
9 | | -- name: DependsOn |
10 | | - type: string |
11 | | -- name: CloudConfig |
12 | | - type: object |
13 | | - default: {} |
| 2 | + # Required parameters from generate-job-matrix.yml |
| 3 | + - name: UsePlatformContainer |
| 4 | + type: boolean |
| 5 | + - name: OSName |
| 6 | + type: string |
| 7 | + - name: Matrix |
| 8 | + type: object |
| 9 | + - name: DependsOn |
| 10 | + type: string |
| 11 | + - name: CloudConfig |
| 12 | + type: object |
| 13 | + default: {} |
14 | 14 |
|
15 | 15 | jobs: |
16 | | -- job: |
17 | | - displayName: Fetch |
18 | | - condition: and(succeeded(), ne(${{ parameters.Matrix }}, '{}')) |
19 | | - dependsOn: ${{ parameters.DependsOn }} |
20 | | - strategy: |
21 | | - matrix: $[ ${{ parameters.Matrix }} ] |
22 | | - variables: |
23 | | - CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS: artifacts-cargo-credprovider |
24 | | - pool: |
25 | | - name: $(Pool) |
26 | | - # 1es pipeline templates converts `image` to demands: ImageOverride under the hood |
27 | | - # which is incompatible with image selection in the default non-1es hosted pools |
28 | | - ${{ if eq(parameters.OSName, 'macOS') }}: |
29 | | - vmImage: $(OSVmImage) |
30 | | - ${{ else }}: |
31 | | - image: $(OSVmImage) |
32 | | - os: ${{ parameters.OSName }} |
33 | | - steps: |
34 | | - - checkout: self |
35 | | - - ${{ if ne(RustToolchainName, 'nightly') }}: |
| 16 | + - job: Fetch |
| 17 | + condition: and(succeeded(), ne(${{ parameters.Matrix }}, '{}')) |
| 18 | + dependsOn: ${{ parameters.DependsOn }} |
| 19 | + strategy: |
| 20 | + matrix: $[ ${{ parameters.Matrix }} ] |
| 21 | + variables: |
| 22 | + CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS: artifacts-cargo-credprovider |
| 23 | + pool: |
| 24 | + name: $(Pool) |
| 25 | + # 1es pipeline templates converts `image` to demands: ImageOverride under the hood |
| 26 | + # which is incompatible with image selection in the default non-1es hosted pools |
| 27 | + ${{ if eq(parameters.OSName, 'macOS') }}: |
| 28 | + vmImage: $(OSVmImage) |
| 29 | + ${{ else }}: |
| 30 | + image: $(OSVmImage) |
| 31 | + os: ${{ parameters.OSName }} |
| 32 | + steps: |
| 33 | + - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml |
| 34 | + parameters: |
| 35 | + paths: |
| 36 | + - "/*" |
36 | 37 | - template: /eng/pipelines/templates/steps/use-rust.yml@self |
37 | 38 | parameters: |
38 | 39 | Toolchain: nightly |
39 | | - |
40 | | - - template: /eng/pipelines/templates/steps/use-rust.yml@self |
41 | | - parameters: |
42 | | - Toolchain: $(RustToolchainName) |
43 | | - - pwsh: cargo install --locked --index sparse+https://pkgs.dev.azure.com/artifacts-public/PublicTools/_packaging/AzureArtifacts/Cargo/index/ artifacts-cargo-credprovider |
44 | | - displayName: Install cargo credential provider |
45 | | - - pwsh: cargo login --registry azure-sdk-for-rust |
46 | | - displayName: Login to azure-sdk-for-rust registry |
47 | | - - pwsh: cargo +nightly -Zscript eng/scripts/use-registry.rs azure |
48 | | - displayName: Configure azure-sdk-for-rust registry |
49 | | - - pwsh: cargo fetch |
50 | | - displayName: Fetch dependencies |
| 40 | + Condition: and(succeeded(), ne(RustToolchainName, 'night')) |
| 41 | + - template: /eng/pipelines/templates/steps/use-rust.yml@self |
| 42 | + parameters: |
| 43 | + Toolchain: $(RustToolchainName) |
| 44 | + - pwsh: cargo install --locked --index sparse+https://pkgs.dev.azure.com/artifacts-public/PublicTools/_packaging/AzureArtifacts/Cargo/index/ artifacts-cargo-credprovider |
| 45 | + displayName: Install cargo credential provider |
| 46 | + - pwsh: cargo login --registry azure-sdk-for-rust |
| 47 | + displayName: Login to azure-sdk-for-rust registry |
| 48 | + - pwsh: cargo +nightly -Zscript eng/scripts/use-registry.rs azure |
| 49 | + displayName: Configure azure-sdk-for-rust registry |
| 50 | + - pwsh: cargo fetch |
| 51 | + displayName: Fetch dependencies |
0 commit comments