Skip to content

Commit 67b32df

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20240710.7 (#104747)
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions From Version 6.0.0-beta.24266.4 -> To Version 6.0.0-beta.24360.7 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 89f7f62 commit 67b32df

17 files changed

+339
-81
lines changed

eng/Version.Details.xml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,77 +26,77 @@
2626
</Dependency>
2727
</ProductDependencies>
2828
<ToolsetDependencies>
29-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24266.4">
29+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.24360.7">
3030
<Uri>https://github.com/dotnet/arcade</Uri>
31-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
31+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
3232
</Dependency>
33-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24266.4">
33+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.24360.7">
3434
<Uri>https://github.com/dotnet/arcade</Uri>
35-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
35+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24266.4">
37+
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.24360.7">
3838
<Uri>https://github.com/dotnet/arcade</Uri>
39-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
39+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
4040
</Dependency>
41-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24266.4">
41+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.24360.7">
4242
<Uri>https://github.com/dotnet/arcade</Uri>
43-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
43+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
4444
</Dependency>
45-
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24266.4">
45+
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.24360.7">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
47+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24266.4">
49+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.24360.7">
5050
<Uri>https://github.com/dotnet/arcade</Uri>
51-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
51+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
5252
</Dependency>
53-
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24266.4">
53+
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.24360.7">
5454
<Uri>https://github.com/dotnet/arcade</Uri>
55-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
55+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
5656
</Dependency>
57-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24266.4">
57+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.24360.7">
5858
<Uri>https://github.com/dotnet/arcade</Uri>
59-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
59+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
6060
</Dependency>
61-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24266.4">
61+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.24360.7">
6262
<Uri>https://github.com/dotnet/arcade</Uri>
63-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
63+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24266.4">
65+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.24360.7">
6666
<Uri>https://github.com/dotnet/arcade</Uri>
67-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
67+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
6868
</Dependency>
69-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24266.4">
69+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.24360.7">
7070
<Uri>https://github.com/dotnet/arcade</Uri>
71-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
71+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
7272
</Dependency>
73-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24266.4">
73+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.24360.7">
7474
<Uri>https://github.com/dotnet/arcade</Uri>
75-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
75+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
7676
</Dependency>
77-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24266.4">
77+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.24360.7">
7878
<Uri>https://github.com/dotnet/arcade</Uri>
79-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
79+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
8080
</Dependency>
81-
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24266.4">
81+
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.24360.7">
8282
<Uri>https://github.com/dotnet/arcade</Uri>
83-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
83+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
8484
</Dependency>
85-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24266.4">
85+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.24360.7">
8686
<Uri>https://github.com/dotnet/arcade</Uri>
87-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
87+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
8888
</Dependency>
89-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24266.4">
89+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.24360.7">
9090
<Uri>https://github.com/dotnet/arcade</Uri>
91-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
91+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
9292
</Dependency>
93-
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24266.4">
93+
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.24360.7">
9494
<Uri>https://github.com/dotnet/arcade</Uri>
95-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
95+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
9696
</Dependency>
97-
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24266.4">
97+
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.24360.7">
9898
<Uri>https://github.com/dotnet/arcade</Uri>
99-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
99+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
100100
</Dependency>
101101
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
102102
<Uri>https://github.com/microsoft/vstest</Uri>
@@ -222,9 +222,9 @@
222222
<Uri>https://github.com/dotnet/xharness</Uri>
223223
<Sha>d1dd9c2ce3fc0b9358d2cda64c52d052d1a612c1</Sha>
224224
</Dependency>
225-
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24266.4">
225+
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.24360.7">
226226
<Uri>https://github.com/dotnet/arcade</Uri>
227-
<Sha>2eab07c3d7b78219d10099b19fafeef2ecae1779</Sha>
227+
<Sha>fbc993a9e8fb4926ce04c95ba2e48852c9d9df65</Sha>
228228
</Dependency>
229229
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21416.5">
230230
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

eng/Versions.props

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@
4242
<!-- SDK dependencies -->
4343
<MicrosoftDotNetCompatibilityVersion>1.1.0-preview.22164.17</MicrosoftDotNetCompatibilityVersion>
4444
<!-- Arcade dependencies -->
45-
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24266.4</MicrosoftDotNetApiCompatVersion>
46-
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksFeedVersion>
47-
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24266.4</MicrosoftDotNetCodeAnalysisVersion>
48-
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenAPIVersion>
49-
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24266.4</MicrosoftDotNetGenFacadesVersion>
50-
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24266.4</MicrosoftDotNetXUnitExtensionsVersion>
51-
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24266.4</MicrosoftDotNetXUnitConsoleRunnerVersion>
52-
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksArchivesVersion>
53-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksInstallersVersion>
54-
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksPackagingVersion>
55-
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksTemplatingVersion>
56-
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24266.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
57-
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24266.4</MicrosoftDotNetRemoteExecutorVersion>
58-
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24266.4</MicrosoftDotNetVersionToolsTasksVersion>
59-
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24266.4</MicrosoftDotNetPackageTestingVersion>
45+
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.24360.7</MicrosoftDotNetApiCompatVersion>
46+
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksFeedVersion>
47+
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.24360.7</MicrosoftDotNetCodeAnalysisVersion>
48+
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.24360.7</MicrosoftDotNetGenAPIVersion>
49+
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.24360.7</MicrosoftDotNetGenFacadesVersion>
50+
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.24360.7</MicrosoftDotNetXUnitExtensionsVersion>
51+
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.24360.7</MicrosoftDotNetXUnitConsoleRunnerVersion>
52+
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksArchivesVersion>
53+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksInstallersVersion>
54+
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksPackagingVersion>
55+
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksTemplatingVersion>
56+
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.24360.7</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
57+
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.24360.7</MicrosoftDotNetRemoteExecutorVersion>
58+
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.24360.7</MicrosoftDotNetVersionToolsTasksVersion>
59+
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.24360.7</MicrosoftDotNetPackageTestingVersion>
6060
<!-- NuGet dependencies -->
6161
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
6262
<!-- Installer dependencies -->

eng/common/templates-official/job/source-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ parameters:
3131
# container and pool.
3232
platform: {}
3333

34+
# If set to true and running on a non-public project,
35+
# Internal blob storage locations will be enabled.
36+
# This is not enabled by default because many repositories do not need internal sources
37+
# and do not need to have the required service connections approved in the pipeline.
38+
enableInternalSources: false
39+
3440
jobs:
3541
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
3642
displayName: Source-Build (${{ parameters.platform.name }})
@@ -59,6 +65,8 @@ jobs:
5965
clean: all
6066

6167
steps:
68+
- ${{ if eq(parameters.enableInternalSources, true) }}:
69+
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
6270
- template: /eng/common/templates-official/steps/source-build.yml
6371
parameters:
6472
platform: ${{ parameters.platform }}

eng/common/templates-official/job/source-index-stage1.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexPackageVersion: 1.0.1-20240320.1
3+
sourceIndexUploadPackageVersion: 2.0.0-20240502.12
4+
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240129.2
45
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
56
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
67
preSteps: []
@@ -17,14 +18,14 @@ jobs:
1718
dependsOn: ${{ parameters.dependsOn }}
1819
condition: ${{ parameters.condition }}
1920
variables:
20-
- name: SourceIndexPackageVersion
21-
value: ${{ parameters.sourceIndexPackageVersion }}
21+
- name: SourceIndexUploadPackageVersion
22+
value: ${{ parameters.sourceIndexUploadPackageVersion }}
23+
- name: SourceIndexProcessBinlogPackageVersion
24+
value: ${{ parameters.sourceIndexProcessBinlogPackageVersion }}
2225
- name: SourceIndexPackageSource
2326
value: ${{ parameters.sourceIndexPackageSource }}
2427
- name: BinlogPath
2528
value: ${{ parameters.binlogPath }}
26-
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
27-
- group: source-dot-net stage1 variables
2829

2930
pool: ${{ parameters.pool }}
3031
steps:
@@ -40,8 +41,8 @@ jobs:
4041
workingDirectory: $(Agent.TempDirectory)
4142

4243
- script: |
43-
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
44-
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
44+
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(sourceIndexProcessBinlogPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
45+
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(sourceIndexUploadPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
4546
displayName: Download Tools
4647
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
4748
workingDirectory: $(Agent.TempDirectory)
@@ -53,7 +54,21 @@ jobs:
5354
displayName: Process Binlog into indexable sln
5455

5556
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
56-
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
57+
- task: AzureCLI@2
58+
displayName: Get stage 1 auth token
59+
inputs:
60+
azureSubscription: 'SourceDotNet Stage1 Publish'
61+
addSpnToEnvironment: true
62+
scriptType: 'ps'
63+
scriptLocation: 'inlineScript'
64+
inlineScript: |
65+
echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId"
66+
echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken"
67+
echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId"
68+
69+
- script: |
70+
az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
71+
displayName: "Login to Azure"
72+
73+
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
5774
displayName: Upload stage1 artifacts to source index
58-
env:
59-
BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url)

eng/common/templates-official/jobs/source-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ parameters:
2121
# one job runs on 'defaultManagedPlatform'.
2222
platforms: []
2323

24+
# If set to true and running on a non-public project,
25+
# Internal nuget and blob storage locations will be enabled.
26+
# This is not enabled by default because many repositories do not need internal sources
27+
# and do not need to have the required service connections approved in the pipeline.
28+
enableInternalSources: false
29+
2430
jobs:
2531

2632
- ${{ if ne(parameters.allCompletedJobId, '') }}:
@@ -38,9 +44,11 @@ jobs:
3844
parameters:
3945
jobNamePrefix: ${{ parameters.jobNamePrefix }}
4046
platform: ${{ platform }}
47+
enableInternalSources: ${{ parameters.enableInternalSources }}
4148

4249
- ${{ if eq(length(parameters.platforms), 0) }}:
4350
- template: /eng/common/templates-official/job/source-build.yml
4451
parameters:
4552
jobNamePrefix: ${{ parameters.jobNamePrefix }}
4653
platform: ${{ parameters.defaultManagedPlatform }}
54+
enableInternalSources: ${{ parameters.enableInternalSources }}

eng/common/templates-official/post-build/common-variables.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ variables:
22
- group: AzureDevOps-Artifact-Feeds-Pats
33
- group: DotNet-Blob-Feed
44
- group: DotNet-DotNetCli-Storage
5-
- group: DotNet-MSRC-Storage
65
- group: Publish-Build-Assets
76

87
# Whether the build is internal or not
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'
2+
# variable with the base64-encoded SAS token, by default
3+
4+
parameters:
5+
- name: federatedServiceConnection
6+
type: string
7+
default: 'dotnetbuilds-internal-read'
8+
- name: outputVariableName
9+
type: string
10+
default: 'dotnetbuilds-internal-container-read-token-base64'
11+
- name: expiryInHours
12+
type: number
13+
default: 1
14+
- name: base64Encode
15+
type: boolean
16+
default: true
17+
18+
steps:
19+
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
20+
- template: /eng/common/templates-official/steps/get-delegation-sas.yml
21+
parameters:
22+
federatedServiceConnection: ${{ parameters.federatedServiceConnection }}
23+
outputVariableName: ${{ parameters.outputVariableName }}
24+
expiryInHours: ${{ parameters.expiryInHours }}
25+
base64Encode: ${{ parameters.base64Encode }}
26+
storageAccount: dotnetbuilds
27+
container: internal
28+
permissions: rl
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
parameters:
2+
- name: federatedServiceConnection
3+
type: string
4+
- name: outputVariableName
5+
type: string
6+
- name: expiryInHours
7+
type: number
8+
default: 1
9+
- name: base64Encode
10+
type: boolean
11+
default: false
12+
- name: storageAccount
13+
type: string
14+
- name: container
15+
type: string
16+
- name: permissions
17+
type: string
18+
default: 'rl'
19+
20+
steps:
21+
- task: AzureCLI@2
22+
displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}'
23+
inputs:
24+
azureSubscription: ${{ parameters.federatedServiceConnection }}
25+
scriptType: 'pscore'
26+
scriptLocation: 'inlineScript'
27+
inlineScript: |
28+
# Calculate the expiration of the SAS token and convert to UTC
29+
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
30+
31+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
32+
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error "Failed to generate SAS token."
35+
exit 1
36+
}
37+
38+
if ('${{ parameters.base64Encode }}' -eq 'true') {
39+
$sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))
40+
}
41+
42+
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
43+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas"

0 commit comments

Comments
 (0)