[main] Update dependencies from dotnet/arcade (#7369)

* Update dependencies from https://github.com/dotnet/arcade build 20220204.4

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XUnitExtensions
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22104.4

* Update dependencies from https://github.com/dotnet/arcade build 20220207.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XUnitExtensions
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22107.2

* Update dependencies from https://github.com/dotnet/arcade build 20220209.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XUnitExtensions
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22109.2

* Update dependencies from https://github.com/dotnet/arcade build 20220214.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XUnitExtensions
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22114.1

* Update dependencies from https://github.com/dotnet/arcade build 20220216.15

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XUnitExtensions
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22116.15

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
This commit is contained in:
dotnet-maestro[bot] 2022-02-17 09:07:50 -08:00 коммит произвёл GitHub
Родитель def4fbb867
Коммит 7aa73b7de5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 110 добавлений и 12 удалений

Просмотреть файл

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22102.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22116.15">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>93e08e378eb00a4267ffeca24b6bebb4f6c011ef</Sha>
<Sha>40eacd2afc9cfd2ba892b5eadb3e728c1008fa38</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.1.0-rc.103">
@ -14,9 +14,9 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>592501cbb9c9394072a245c15b3458ff88155d85</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22102.3">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22116.15">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>93e08e378eb00a4267ffeca24b6bebb4f6c011ef</Sha>
<Sha>40eacd2afc9cfd2ba892b5eadb3e728c1008fa38</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

Просмотреть файл

@ -32,7 +32,7 @@
<!-- DotNetCliVersion MUST match the dotnet version in global.json.
Otherwise, this version of dotnet will not be installed and the build will error out. -->
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22102.3</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22116.15</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.2.21154.6</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNetCompilersToolsetVersion>4.1.0-3.22075.3</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.1.0-rc.103</NuGetBuildTasksVersion>

19
eng/common/generate-sbom-prep.ps1 сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
Param(
[Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
)
Write-Host "Creating dir $ManifestDirPath"
# create directory for sbom manifest to be placed
if (!(Test-Path -path $ManifestDirPath))
{
New-Item -ItemType Directory -path $ManifestDirPath
Write-Host "Successfully created directory $ManifestDirPath"
}
else{
Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
}
Write-Host "Updating artifact name"
$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_'
Write-Host "Artifact name $artifact_name"
Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name"

22
eng/common/generate-sbom-prep.sh сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,22 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
manifest_dir=$1
if [ ! -d "$manifest_dir" ] ; then
mkdir -p "$manifest_dir"
echo "Sbom directory created." $manifest_dir
else
Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
fi
artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM"
echo "Artifact name before : "$artifact_name
# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts.
safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}"
echo "Artifact name after : "$safe_artifact_name
export ARTIFACT_NAME=$safe_artifact_name
echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name"
exit 0

10
eng/common/templates/job/job.yml сгенерированный поставляемый
Просмотреть файл

@ -31,6 +31,10 @@ parameters:
name: ''
preSteps: []
runAsPublic: false
# Sbom related params
enableSbom: true
PackageVersion: 6.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
jobs:
- job: ${{ parameters.name }}
@ -247,3 +251,9 @@ jobs:
ArtifactName: AssetManifests
continueOnError: ${{ parameters.continueOnError }}
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
- template: /eng/common/templates/steps/generate-sbom.yml
parameters:
PackageVersion: ${{ parameters.packageVersion}}
BuildDropPath: ${{ parameters.buildDropPath }}

15
eng/common/templates/job/source-build.yml сгенерированный поставляемый
Просмотреть файл

@ -31,11 +31,6 @@ parameters:
# container and pool.
platform: {}
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
# source-build builds run in Docker, including the default managed platform.
defaultContainerHostPool:
vmImage: ubuntu-20.04
jobs:
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
displayName: Source-Build (${{ parameters.platform.name }})
@ -47,7 +42,15 @@ jobs:
container: ${{ parameters.platform.container }}
${{ if eq(parameters.platform.pool, '') }}:
pool: ${{ parameters.defaultContainerHostPool }}
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
# source-build builds run in Docker, including the default managed platform.
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
${{ if ne(parameters.platform.pool, '') }}:
pool: ${{ parameters.platform.pool }}

44
eng/common/templates/steps/generate-sbom.yml сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,44 @@
# BuildDropPath - The root folder of the drop directory for which the manifest file will be generated.
# PackageName - The name of the package this SBOM represents.
# PackageVersion - The version of the package this SBOM represents.
# ManifestDirPath - The path of the directory where the generated manifest files will be placed
parameters:
PackageVersion: 6.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
PackageName: '.NET'
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
sbomContinueOnError: true
steps:
- task: PowerShell@2
displayName: Prep for SBOM generation in (Non-linux)
condition: or(eq(variables['Agent.Os'], 'Windows_NT'), eq(variables['Agent.Os'], 'Darwin'))
inputs:
filePath: ./eng/common/generate-sbom-prep.ps1
arguments: ${{parameters.manifestDirPath}}
# Chmodding is a workaround for https://github.com/dotnet/arcade/issues/8461
- script: |
chmod +x ./eng/common/generate-sbom-prep.sh
./eng/common/generate-sbom-prep.sh ${{parameters.manifestDirPath}}
displayName: Prep for SBOM generation in (Linux)
condition: eq(variables['Agent.Os'], 'Linux')
continueOnError: ${{ parameters.sbomContinueOnError }}
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Generate SBOM manifest'
continueOnError: ${{ parameters.sbomContinueOnError }}
inputs:
PackageName: ${{ parameters.packageName }}
BuildDropPath: ${{ parameters.buildDropPath }}
PackageVersion: ${{ parameters.packageVersion }}
ManifestDirPath: ${{ parameters.manifestDirPath }}
- task: PublishPipelineArtifact@1
displayName: Publish SBOM manifest
continueOnError: ${{parameters.sbomContinueOnError}}
inputs:
targetPath: '${{parameters.manifestDirPath}}'
artifactName: $(ARTIFACT_NAME)

Просмотреть файл

@ -10,6 +10,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22102.3"
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22116.15"
}
}