Skip to content

Commit ad6f7a6

Browse files
author
Mirroring
committed
Merge commit 'b1fbaaab3f1c9fe17d22eda6c0425c2f2aa89674'
2 parents 3c16cba + b1fbaaa commit ad6f7a6

File tree

11 files changed

+51
-36
lines changed

11 files changed

+51
-36
lines changed

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -376,26 +376,26 @@
376376
<Uri>https://github.com/dotnet/winforms</Uri>
377377
<Sha>abda8e3bfa78319363526b5a5f86863ec979940e</Sha>
378378
</Dependency>
379-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24360.5">
379+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24367.1">
380380
<Uri>https://github.com/dotnet/arcade</Uri>
381-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
381+
<Sha>fa3d544b066661522f1ec5d5e8cfd461a29b0f8a</Sha>
382382
<SourceBuild RepoName="arcade" ManagedOnly="true" />
383383
</Dependency>
384-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.24360.5">
384+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.24367.1">
385385
<Uri>https://github.com/dotnet/arcade</Uri>
386-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
386+
<Sha>fa3d544b066661522f1ec5d5e8cfd461a29b0f8a</Sha>
387387
</Dependency>
388-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.24360.5">
388+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.24367.1">
389389
<Uri>https://github.com/dotnet/arcade</Uri>
390-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
390+
<Sha>fa3d544b066661522f1ec5d5e8cfd461a29b0f8a</Sha>
391391
</Dependency>
392-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.24360.5">
392+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.24367.1">
393393
<Uri>https://github.com/dotnet/arcade</Uri>
394-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
394+
<Sha>fa3d544b066661522f1ec5d5e8cfd461a29b0f8a</Sha>
395395
</Dependency>
396-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.24360.5">
396+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.24367.1">
397397
<Uri>https://github.com/dotnet/arcade</Uri>
398-
<Sha>c9efa535175049eb9cba06cae1f8c3d5dbe768a9</Sha>
398+
<Sha>fa3d544b066661522f1ec5d5e8cfd461a29b0f8a</Sha>
399399
</Dependency>
400400
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="8.1.0-preview.23604.1">
401401
<Uri>https://github.com/dotnet/extensions</Uri>

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@
162162
<NuGetVersioningVersion>6.2.4</NuGetVersioningVersion>
163163
<NuGetFrameworksVersion>6.2.4</NuGetFrameworksVersion>
164164
<!-- Packages from dotnet/arcade -->
165-
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.24360.5</MicrosoftDotNetBuildTasksInstallersVersion>
166-
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.24360.5</MicrosoftDotNetBuildTasksTemplatingVersion>
167-
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.24360.5</MicrosoftDotNetRemoteExecutorVersion>
165+
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.24367.1</MicrosoftDotNetBuildTasksInstallersVersion>
166+
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.24367.1</MicrosoftDotNetBuildTasksTemplatingVersion>
167+
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.24367.1</MicrosoftDotNetRemoteExecutorVersion>
168168
<!-- Packages from dotnet/source-build-externals -->
169169
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.24269.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
170170
<!-- Packages from dotnet/source-build-reference-packages -->

eng/common/sdl/NuGet.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
</solution>
66
<packageSources>
77
<clear />
8-
<add key="guardian" value="https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json" />
8+
<add key="guardian" value="https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json" />
99
</packageSources>
1010
<packageSourceMapping>
1111
<packageSource key="guardian">
12-
<package pattern="microsoft.guardian.cli" />
12+
<package pattern="Microsoft.Guardian.Cli.win-x64" />
1313
</packageSource>
1414
</packageSourceMapping>
1515
<disabledPackageSources>

eng/common/sdl/execute-all-sdl-tools.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Param(
66
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
77
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
88
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
9-
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
109

1110
# Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list
1211
# format.
@@ -75,7 +74,7 @@ try {
7574
}
7675

7776
Exec-BlockVerbosely {
78-
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
77+
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -GuardianLoggerLevel $GuardianLoggerLevel
7978
}
8079
$gdnFolder = Join-Path $workingDirectory '.gdn'
8180

@@ -104,7 +103,6 @@ try {
104103
-TargetDirectory $targetDirectory `
105104
-GdnFolder $gdnFolder `
106105
-ToolsList $tools `
107-
-AzureDevOpsAccessToken $AzureDevOpsAccessToken `
108106
-GuardianLoggerLevel $GuardianLoggerLevel `
109107
-CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams `
110108
-PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams `

eng/common/sdl/init-sdl.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Param(
33
[string] $Repository,
44
[string] $BranchName='master',
55
[string] $WorkingDirectory,
6-
[string] $AzureDevOpsAccessToken,
76
[string] $GuardianLoggerLevel='Standard'
87
)
98

@@ -21,14 +20,7 @@ $ci = $true
2120
# Don't display the console progress UI - it's a huge perf hit
2221
$ProgressPreference = 'SilentlyContinue'
2322

24-
# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file
25-
$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken"))
26-
$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn")
27-
$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0"
28-
$zipFile = "$WorkingDirectory/gdn.zip"
29-
3023
Add-Type -AssemblyName System.IO.Compression.FileSystem
31-
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
3224

3325
try {
3426
# if the folder does not exist, we'll do a guardian init and push it to the remote repository

eng/common/sdl/sdl.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ function Install-Gdn {
44
[Parameter(Mandatory=$true)]
55
[string]$Path,
66

7+
[string]$Source = "https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json",
8+
79
# If omitted, install the latest version of Guardian, otherwise install that specific version.
810
[string]$Version
911
)
@@ -19,7 +21,7 @@ function Install-Gdn {
1921
$ci = $true
2022
. $PSScriptRoot\..\tools.ps1
2123

22-
$argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
24+
$argumentList = @("install", "Microsoft.Guardian.Cli.win-x64", "-Source $Source", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
2325

2426
if ($Version) {
2527
$argumentList += "-Version $Version"

eng/common/templates-official/steps/execute-sdl.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ parameters:
99

1010
steps:
1111
- task: NuGetAuthenticate@1
12-
inputs:
13-
nuGetServiceConnections: GuardianConnect
1412

1513
- task: NuGetToolInstaller@1
1614
displayName: 'Install NuGet.exe'

eng/common/templates-official/steps/get-federated-access-token.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,29 @@ parameters:
33
type: string
44
- name: outputVariableName
55
type: string
6+
- name: stepName
7+
type: string
8+
default: 'getFederatedAccessToken'
9+
- name: condition
10+
type: string
11+
default: ''
612
# Resource to get a token for. Common values include:
713
# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps
814
# - 'https://storage.azure.com/' for storage
915
# Defaults to Azure DevOps
1016
- name: resource
1117
type: string
1218
default: '499b84ac-1321-427f-aa17-267ca6975798'
19+
- name: isStepOutputVariable
20+
type: boolean
21+
default: false
1322

1423
steps:
1524
- task: AzureCLI@2
1625
displayName: 'Getting federated access token for feeds'
26+
name: ${{ parameters.stepName }}
27+
${{ if ne(parameters.condition, '') }}:
28+
condition: ${{ parameters.condition }}
1729
inputs:
1830
azureSubscription: ${{ parameters.federatedServiceConnection }}
1931
scriptType: 'pscore'
@@ -25,4 +37,4 @@ steps:
2537
exit 1
2638
}
2739
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
28-
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken"
40+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"

eng/common/templates/steps/execute-sdl.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ parameters:
99

1010
steps:
1111
- task: NuGetAuthenticate@1
12-
inputs:
13-
nuGetServiceConnections: GuardianConnect
1412

1513
- task: NuGetToolInstaller@1
1614
displayName: 'Install NuGet.exe'
@@ -36,16 +34,19 @@ steps:
3634
displayName: Execute SDL (Overridden)
3735
continueOnError: ${{ parameters.sdlContinueOnError }}
3836
condition: ${{ parameters.condition }}
37+
env:
38+
GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken)
3939

4040
- ${{ if eq(parameters.overrideParameters, '') }}:
4141
- powershell: ${{ parameters.executeAllSdlToolsScript }}
4242
-GuardianCliLocation $(GuardianCliLocation)
4343
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
44-
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
4544
${{ parameters.additionalParameters }}
4645
displayName: Execute SDL
4746
continueOnError: ${{ parameters.sdlContinueOnError }}
4847
condition: ${{ parameters.condition }}
48+
env:
49+
GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken)
4950

5051
- ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}:
5152
# We want to publish the Guardian results and configuration for easy diagnosis. However, the

eng/common/templates/steps/get-federated-access-token.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,29 @@ parameters:
33
type: string
44
- name: outputVariableName
55
type: string
6+
- name: stepName
7+
type: string
8+
default: 'getFederatedAccessToken'
9+
- name: condition
10+
type: string
11+
default: ''
612
# Resource to get a token for. Common values include:
713
# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps
814
# - 'https://storage.azure.com/' for storage
915
# Defaults to Azure DevOps
1016
- name: resource
1117
type: string
1218
default: '499b84ac-1321-427f-aa17-267ca6975798'
19+
- name: isStepOutputVariable
20+
type: boolean
21+
default: false
1322

1423
steps:
1524
- task: AzureCLI@2
1625
displayName: 'Getting federated access token for feeds'
26+
name: ${{ parameters.stepName }}
27+
${{ if ne(parameters.condition, '') }}:
28+
condition: ${{ parameters.condition }}
1729
inputs:
1830
azureSubscription: ${{ parameters.federatedServiceConnection }}
1931
scriptType: 'pscore'
@@ -25,4 +37,4 @@ steps:
2537
exit 1
2638
}
2739
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
28-
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken"
40+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"msbuild-sdks": {
2929
"Yarn.MSBuild": "1.22.19",
30-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24360.5",
31-
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24360.5"
30+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24367.1",
31+
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24367.1"
3232
}
3333
}

0 commit comments

Comments
 (0)