Skip to content

Commit

Permalink
Merge branch 'main' into AddCoreWcfServicesLatest
Browse files Browse the repository at this point in the history
  • Loading branch information
afifi-ins committed Jul 16, 2024
2 parents 05e132e + d9fc46e commit ee19932
Show file tree
Hide file tree
Showing 161 changed files with 3,350 additions and 4,480 deletions.
9 changes: 9 additions & 0 deletions .CodeQL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file configures CodeQL runs and TSA bug autofiling. For more information, see:
# https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/codeql/troubleshooting/bugs/generated-library-code
# (Access restricted to Microsoft employees only.)

path_classifiers:
refs:
# The tests/ directories don't contain shipping implementations of code, so they should
# be excluded from analysis.
- src/**/tests/*
11 changes: 8 additions & 3 deletions azure-pipelines-arcade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ extends:
sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022-pt
image: 1es-windows-2022
os: windows
codeql:
compiled:
enabled: false
justificationForDisabling: 'CodeQL is already enabled in pipeline dotnet-wcf-codeql; this is a duplicate scan'
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: Build
displayName: Build
jobs:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.SourceBranch'], 'refs/heads/release/6.1'))) }}:
- template: /eng/common/templates-official/job/onelocbuild.yml@self
parameters:
MirrorRepo: wcf
Expand All @@ -60,14 +64,15 @@ extends:
enablePublishBuildAssets: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableTelemetry: true
enableSourceIndex: ${{ eq(variables['Build.SourceBranch'], 'refs/heads/main') }}
helixRepo: dotnet/wcf
jobs:
- job: Windows
timeoutInMinutes: 90
pool:
${{ if eq(variables._RunAsInternal, True) }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022-pt
image: 1es-windows-2022
os: windows
variables:
- _InternalBuildArgs: ''
Expand Down
6 changes: 6 additions & 0 deletions dotnet-svcutil.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-svcutil", "src\dotne
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-svcutil-lib.Tests", "src\dotnet-svcutil\lib\tests\src\dotnet-svcutil-lib.Tests.csproj", "{41376AC5-871E-4CAB-BCF9-1D5CD3351A90}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Svcutil.NamedPipeMetadataImporter", "src\dotnet-svcutil\lib\Microsoft.Svcutil.NamedPipeMetadataImporter\Microsoft.Svcutil.NamedPipeMetadataImporter.csproj", "{0EAB34F1-983D-4E18-B052-BDBE100DA83F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{41376AC5-871E-4CAB-BCF9-1D5CD3351A90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41376AC5-871E-4CAB-BCF9-1D5CD3351A90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41376AC5-871E-4CAB-BCF9-1D5CD3351A90}.Release|Any CPU.Build.0 = Release|Any CPU
{0EAB34F1-983D-4E18-B052-BDBE100DA83F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EAB34F1-983D-4E18-B052-BDBE100DA83F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EAB34F1-983D-4E18-B052-BDBE100DA83F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EAB34F1-983D-4E18-B052-BDBE100DA83F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24178.6">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24324.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4345e14684eab24fa2f8217706756dd7c0787d84</Sha>
<Sha>79f0a2e647b3dcec3a88dcdcb9037736c21fe965</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="9.0.0-beta.24178.6">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="9.0.0-beta.24324.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4345e14684eab24fa2f8217706756dd7c0787d84</Sha>
<Sha>79f0a2e647b3dcec3a88dcdcb9037736c21fe965</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24178.6">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24324.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4345e14684eab24fa2f8217706756dd7c0787d84</Sha>
<Sha>79f0a2e647b3dcec3a88dcdcb9037736c21fe965</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</PropertyGroup>
<!-- Arcade dependencies -->
<PropertyGroup>
<MicrosoftDotNetGenFacadesPackageVersion>9.0.0-beta.24178.6</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>9.0.0-beta.24178.6</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetGenFacadesPackageVersion>9.0.0-beta.24324.8</MicrosoftDotNetGenFacadesPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>9.0.0-beta.24324.8</MicrosoftDotNetXUnitExtensionsPackageVersion>
</PropertyGroup>
<!-- CoreFx dependencies -->
<PropertyGroup>
Expand Down
52 changes: 28 additions & 24 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
# See example call for this script below.
#
# - task: PowerShell@2
# displayName: Setup Private Feeds Credentials
Expand All @@ -21,11 +14,18 @@
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
# - The credential provider is installed.
#
# This logic is also abstracted into enable-internal-sources.yml.

[CmdletBinding()]
param (
[Parameter(Mandatory = $true)][string]$ConfigFile,
[Parameter(Mandatory = $true)][string]$Password
$Password
)

$ErrorActionPreference = "Stop"
Expand All @@ -48,11 +48,17 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
else {
Write-Host "Package source $SourceName already present."
}

AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
}

# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $pwd) {
# If no cred supplied, don't do anything.
if (!$pwd) {
return;
}

# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
Expand Down Expand Up @@ -110,11 +116,6 @@ if (!(Test-Path $ConfigFile -PathType Leaf)) {
ExitWithExitCode 1
}

if (!$Password) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
}

# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
Expand All @@ -127,11 +128,14 @@ if ($sources -eq $null) {
$doc.DocumentElement.AppendChild($sources) | Out-Null
}

# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
$creds = $null
if ($Password) {
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
}
}

# Check for disabledPackageSources; we'll enable any darc-int ones we find there
Expand Down Expand Up @@ -164,4 +168,4 @@ foreach ($dotnetVersion in $dotnetVersions) {
}
}

$doc.Save($filename)
$doc.Save($filename)
60 changes: 28 additions & 32 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
#!/usr/bin/env bash

# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
# disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing.
# See example call for this script below.
#
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# displayName: Setup Internal Feeds
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# arguments: $(Build.SourcesDirectory)/NuGet.config
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
# - task: NuGetAuthenticate@1
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt)
# - The credential provider is installed.
#
# This logic is also abstracted into enable-internal-sources.yml.

ConfigFile=$1
CredToken=$2
Expand All @@ -48,11 +47,6 @@ if [ ! -f "$ConfigFile" ]; then
ExitWithExitCode 1
fi

if [ -z "$CredToken" ]; then
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1
fi

if [[ `uname -s` == "Darwin" ]]; then
NL=$'\\\n'
TB=''
Expand Down Expand Up @@ -140,18 +134,20 @@ PackageSources+="$IFS"
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS

for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."
if [ "$CredToken" ]; then
for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."

PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"

sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
fi

# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
grep -i "<disabledPackageSources>" $ConfigFile
Expand Down
4 changes: 1 addition & 3 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Param(
[switch] $pack,
[switch] $publish,
[switch] $clean,
[switch] $verticalBuild,
[switch][Alias('pb')]$productBuild,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
Expand Down Expand Up @@ -60,7 +59,6 @@ function Print-Usage() {
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
Write-Host " -verticalBuild Run in 'vertical build' infra mode."
Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
Write-Host ""

Expand Down Expand Up @@ -124,7 +122,7 @@ function Build {
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
/p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
/p:DotNetBuildRepo=$productBuild `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
Expand Down
8 changes: 0 additions & 8 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
restore=false
build=false
source_build=false
vertical_build=false
product_build=false
rebuild=false
test=false
Expand Down Expand Up @@ -141,13 +140,6 @@ while [[ $# > 0 ]]; do
restore=true
pack=true
;;
-verticalbuild|-vb)
build=true
vertical_build=true
product_build=true
restore=true
pack=true
;;
-test|-t)
test=true
;;
Expand Down
Loading

0 comments on commit ee19932

Please sign in to comment.