Skip to content

Commit 3a6c061

Browse files
[main] Update dependencies from dotnet/arcade (#5118)
* Update dependencies from https://github.com/dotnet/arcade build 20240621.4 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XliffTasks From Version 9.0.0-beta.24306.4 -> To Version 9.0.0-beta.24321.4 * Update dependencies from https://github.com/dotnet/arcade build 20240627.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XliffTasks From Version 9.0.0-beta.24306.4 -> To Version 9.0.0-beta.24327.1 * Update dependencies from https://github.com/dotnet/arcade build 20240627.1 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XliffTasks From Version 9.0.0-beta.24306.4 -> To Version 9.0.0-beta.24327.1 * Update dependencies from https://github.com/dotnet/arcade build 20240702.2 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XliffTasks From Version 9.0.0-beta.24306.4 -> To Version 9.0.0-beta.24352.2 * Add arcade issue workaround * add arcade issue workaround * add arcade issue workaround --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Jakub Jareš <me@jakubjares.com>
1 parent 0a59896 commit 3a6c061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+260
-413
lines changed

Directory.Build.targets

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3-
3+
<PropertyGroup>
4+
<!-- Temporary workaround for Arcade issue in net9-preview5 -->
5+
<_NetFrameworkHostedCompilersVersion Condition="'$(_NetFrameworkHostedCompilersVersion)' == ''">4.11.0-3.24280.3</_NetFrameworkHostedCompilersVersion>
6+
</PropertyGroup>
7+
48
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
59

610
<!--

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
</Dependency>
4545
</ProductDependencies>
4646
<ToolsetDependencies>
47-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24306.4">
47+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24352.2">
4848
<Uri>https://github.com/dotnet/arcade</Uri>
49-
<Sha>7507f80c8db285bbc9939c1dff522a761cf4edc0</Sha>
49+
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
5050
</Dependency>
5151
<!-- Intermediate is necessary for source build. -->
52-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24306.4">
52+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24352.2">
5353
<Uri>https://github.com/dotnet/arcade</Uri>
54-
<Sha>7507f80c8db285bbc9939c1dff522a761cf4edc0</Sha>
54+
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
5555
<SourceBuild RepoName="arcade" ManagedOnly="true" />
5656
</Dependency>
5757
<Dependency Name="Microsoft.DiaSymReader.Pdb2Pdb" Version="1.1.0-beta2-19575-01">
@@ -62,9 +62,9 @@
6262
<Uri>https://github.com/dotnet/symreader-converter</Uri>
6363
<Sha>c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24306.4">
65+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24352.2">
6666
<Uri>https://github.com/dotnet/arcade</Uri>
67-
<Sha>7507f80c8db285bbc9939c1dff522a761cf4edc0</Sha>
67+
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
6868
</Dependency>
6969
</ToolsetDependencies>
7070
</Dependencies>

eng/common/SetupNugetSources.ps1

+82-61
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
22
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
33
# disabled internal Maestro (darc-int*) feeds.
4-
#
5-
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. This credential
6-
# is added via the standard environment variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. See
7-
# https://github.com/microsoft/artifacts-credprovider/tree/v1.1.1?tab=readme-ov-file#environment-variables for more details
4+
#
5+
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
86
#
97
# See example call for this script below.
108
#
119
# - task: PowerShell@2
12-
# displayName: Setup Internal Feeds
10+
# displayName: Setup Private Feeds Credentials
1311
# condition: eq(variables['Agent.OS'], 'Windows_NT')
1412
# inputs:
1513
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
16-
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config
17-
# - task: NuGetAuthenticate@1
18-
#
14+
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
15+
# env:
16+
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
17+
#
1918
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
2019
# This ensures that:
2120
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
22-
# - The credential provider is installed
21+
# - The credential provider is installed.
2322
#
2423
# This logic is also abstracted into enable-internal-sources.yml.
2524

2625
[CmdletBinding()]
2726
param (
2827
[Parameter(Mandatory = $true)][string]$ConfigFile,
29-
[string]$Password
28+
$Password
3029
)
3130

3231
$ErrorActionPreference = "Stop"
@@ -35,23 +34,12 @@ Set-StrictMode -Version 2.0
3534

3635
. $PSScriptRoot\tools.ps1
3736

38-
$feedEndpoints = $null
39-
40-
# If a credential is provided, ensure that we don't overwrite the current set of
41-
# credentials that may have been provided by a previous call to the credential provider.
42-
if ($Password -and $null -ne $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS) {
43-
$feedEndpoints = $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS | ConvertFrom-Json
44-
} elseif ($Password) {
45-
$feedEndpoints = @{ endpointCredentials = @() }
46-
}
47-
4837
# Add source entry to PackageSources
49-
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) {
38+
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
5039
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
5140

52-
if ($null -eq $packageSource)
41+
if ($packageSource -eq $null)
5342
{
54-
Write-Host "`tAdding package source" $SourceName
5543
$packageSource = $doc.CreateElement("add")
5644
$packageSource.SetAttribute("key", $SourceName)
5745
$packageSource.SetAttribute("value", $SourceEndPoint)
@@ -61,33 +49,63 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) {
6149
Write-Host "Package source $SourceName already present."
6250
}
6351

64-
if ($pwd) {
65-
$feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $SourceEndPoint -pwd $pwd
66-
}
52+
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
6753
}
6854

69-
# Add a new feed endpoint credential
70-
function AddCredential([array]$endpointCredentials, $source, $pwd) {
71-
$endpointCredentials += @{
72-
endpoint = $source;
73-
password = $pwd
55+
# Add a credential node for the specified source
56+
function AddCredential($creds, $source, $username, $pwd) {
57+
# If no cred supplied, don't do anything.
58+
if (!$pwd) {
59+
return;
7460
}
75-
return $endpointCredentials
61+
62+
# Looks for credential configuration for the given SourceName. Create it if none is found.
63+
$sourceElement = $creds.SelectSingleNode($Source)
64+
if ($sourceElement -eq $null)
65+
{
66+
$sourceElement = $doc.CreateElement($Source)
67+
$creds.AppendChild($sourceElement) | Out-Null
68+
}
69+
70+
# Add the <Username> node to the credential if none is found.
71+
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
72+
if ($usernameElement -eq $null)
73+
{
74+
$usernameElement = $doc.CreateElement("add")
75+
$usernameElement.SetAttribute("key", "Username")
76+
$sourceElement.AppendChild($usernameElement) | Out-Null
77+
}
78+
$usernameElement.SetAttribute("value", $Username)
79+
80+
# Add the <ClearTextPassword> to the credential if none is found.
81+
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
82+
# -> https://github.com/NuGet/Home/issues/5526
83+
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
84+
if ($passwordElement -eq $null)
85+
{
86+
$passwordElement = $doc.CreateElement("add")
87+
$passwordElement.SetAttribute("key", "ClearTextPassword")
88+
$sourceElement.AppendChild($passwordElement) | Out-Null
89+
}
90+
91+
$passwordElement.SetAttribute("value", $pwd)
7692
}
7793

78-
function InsertMaestroInternalFeedCredentials($Sources, $pwd) {
79-
$maestroInternalSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
94+
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
95+
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
8096

81-
ForEach ($PackageSource in $maestroInternalSources) {
82-
Write-Host "`tAdding credential for Maestro's feed:" $PackageSource.Key
83-
$feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $PackageSource.value -pwd $pwd
97+
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
98+
99+
ForEach ($PackageSource in $maestroPrivateSources) {
100+
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
101+
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
84102
}
85103
}
86104

87-
function EnableInternalPackageSources($DisabledPackageSources) {
88-
$maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
89-
ForEach ($DisabledPackageSource in $maestroInternalSources) {
90-
Write-Host "`tEnsuring internal source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
105+
function EnablePrivatePackageSources($DisabledPackageSources) {
106+
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
107+
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
108+
Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
91109
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
92110
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
93111
}
@@ -105,46 +123,49 @@ $doc.Load($filename)
105123

106124
# Get reference to <PackageSources> or create one if none exist already
107125
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
108-
if ($null -eq $sources) {
126+
if ($sources -eq $null) {
109127
$sources = $doc.CreateElement("packageSources")
110128
$doc.DocumentElement.AppendChild($sources) | Out-Null
111129
}
112130

131+
$creds = $null
132+
if ($Password) {
133+
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
134+
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
135+
if ($creds -eq $null) {
136+
$creds = $doc.CreateElement("packageSourceCredentials")
137+
$doc.DocumentElement.AppendChild($creds) | Out-Null
138+
}
139+
}
140+
113141
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
114142
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
115-
if ($null -ne $disabledSources) {
143+
if ($disabledSources -ne $null) {
116144
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
117-
EnableInternalPackageSources -DisabledPackageSources $disabledSources
145+
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
118146
}
119147

120-
if ($Password) {
121-
InsertMaestroInternalFeedCredentials -Sources $sources -pwd $Password
122-
}
148+
$userName = "dn-bot"
149+
150+
# Insert credential nodes for Maestro's private feeds
151+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
123152

124153
# 3.1 uses a different feed url format so it's handled differently here
125154
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
126-
if ($null -ne $dotnet31Source) {
127-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json" -pwd $Password
128-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json" -pwd $Password
155+
if ($dotnet31Source -ne $null) {
156+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
157+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
129158
}
130159

131160
$dotnetVersions = @('5','6','7','8')
132161

133162
foreach ($dotnetVersion in $dotnetVersions) {
134163
$feedPrefix = "dotnet" + $dotnetVersion;
135164
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
136-
if ($dotnetSource) {
137-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedprefix-internal/nuget/v3/index.json" -pwd $Password
138-
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v3/index.json" -pwd $Password
165+
if ($dotnetSource -ne $null) {
166+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
167+
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
139168
}
140169
}
141170

142171
$doc.Save($filename)
143-
144-
# If any credentials were added or altered, update the VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable
145-
if ($null -ne $feedEndpoints) {
146-
# ci is set to true so vso logging commands will be used.
147-
$ci = $true
148-
Write-PipelineSetVariable -Name 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' -Value $($feedEndpoints | ConvertTo-Json) -IsMultiJobVariable $false
149-
Write-PipelineSetVariable -Name 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' -Value "False" -IsMultiJobVariable $false
150-
}

eng/common/SetupNugetSources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# This script adds internal feeds required to build commits that depend on intenral package sources. For instance,
3+
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
44
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
55
# disabled internal Maestro (darc-int*) feeds.
66
#

eng/common/core-templates/job/job.yml

+3-21
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ parameters:
2424
enablePublishTestResults: false
2525
enablePublishUsingPipelines: false
2626
enableBuildRetry: false
27-
disableComponentGovernance: ''
28-
componentGovernanceIgnoreDirectories: ''
2927
mergeTestResults: false
3028
testRunTitle: ''
3129
testResultsFormat: ''
3230
name: ''
31+
componentGovernanceSteps: []
3332
preSteps: []
3433
artifactPublishSteps: []
3534
runAsPublic: false
@@ -170,17 +169,8 @@ jobs:
170169
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
171170
continueOnError: true
172171

173-
- template: /eng/common/core-templates/steps/component-governance.yml
174-
parameters:
175-
is1ESPipeline: ${{ parameters.is1ESPipeline }}
176-
${{ if eq(parameters.disableComponentGovernance, '') }}:
177-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
178-
disableComponentGovernance: false
179-
${{ else }}:
180-
disableComponentGovernance: true
181-
${{ else }}:
182-
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
183-
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
172+
- ${{ each step in parameters.componentGovernanceSteps }}:
173+
- ${{ step }}
184174

185175
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
186176
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@@ -190,14 +180,6 @@ jobs:
190180
continueOnError: ${{ parameters.continueOnError }}
191181
env:
192182
TeamName: $(_TeamName)
193-
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
194-
- template: /eng/common/core-templates/steps/generate-sbom.yml
195-
parameters:
196-
is1ESPipeline: ${{ parameters.is1ESPipeline }}
197-
PackageVersion: ${{ parameters.packageVersion}}
198-
BuildDropPath: ${{ parameters.buildDropPath }}
199-
IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
200-
publishArtifacts: false
201183

202184
# Publish test results
203185
- ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}:

eng/common/core-templates/job/publish-build-assets.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ jobs:
8787

8888
- task: NuGetAuthenticate@1
8989

90-
- task: PowerShell@2
90+
- task: AzureCLI@2
9191
displayName: Publish Build Assets
9292
inputs:
93-
filePath: eng\common\sdk-task.ps1
93+
azureSubscription: "Darc: Maestro Production"
94+
scriptType: ps
95+
scriptLocation: scriptPath
96+
scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1
9497
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
9598
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
96-
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
9799
/p:MaestroApiEndpoint=https://maestro.dot.net
98100
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
99101
/p:OfficialBuildId=$(Build.BuildNumber)
@@ -153,14 +155,16 @@ jobs:
153155
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
154156
is1ESPipeline: ${{ parameters.is1ESPipeline }}
155157

156-
- task: PowerShell@2
158+
- task: AzureCLI@2
157159
displayName: Publish Using Darc
158160
inputs:
159-
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
161+
azureSubscription: "Darc: Maestro Production"
162+
scriptType: ps
163+
scriptLocation: scriptPath
164+
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
160165
arguments: -BuildId $(BARBuildId)
161166
-PublishingInfraVersion 3
162167
-AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)'
163-
-MaestroToken '$(MaestroApiAccessToken)'
164168
-WaitPublishingFinish true
165169
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
166170
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'

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

+2-14
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,11 @@ jobs:
6969

7070
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
7171
- task: AzureCLI@2
72-
displayName: Get stage 1 auth token
72+
displayName: Log in to Azure and upload stage1 artifacts to source index
7373
inputs:
7474
azureSubscription: 'SourceDotNet Stage1 Publish'
7575
addSpnToEnvironment: true
7676
scriptType: 'ps'
7777
scriptLocation: 'inlineScript'
7878
inlineScript: |
79-
echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId"
80-
echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken"
81-
echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId"
82-
83-
- script: |
84-
echo "Client ID: $(ARM_CLIENT_ID)"
85-
echo "ID Token: $(ARM_ID_TOKEN)"
86-
echo "Tenant ID: $(ARM_TENANT_ID)"
87-
az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
88-
displayName: "Login to Azure"
89-
90-
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
91-
displayName: Upload stage1 artifacts to source index
79+
$(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1

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

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ variables:
88
# Default Maestro++ API Endpoint and API Version
99
- name: MaestroApiEndPoint
1010
value: "https://maestro.dot.net"
11-
- name: MaestroApiAccessToken
12-
value: $(MaestroAccessToken)
1311
- name: MaestroApiVersion
1412
value: "2020-02-20"
1513

0 commit comments

Comments
 (0)