Skip to content

Commit b9cd505

Browse files
author
Jason Zhai
committed
Merge branch 'main' of https://github.com/dotnet/sdk into merge/release/9.0.3xx-to-main
2 parents b6da3a7 + e259dfc commit b9cd505

File tree

2,433 files changed

+98640
-35603
lines changed

Some content is hidden

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

2,433 files changed

+98640
-35603
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dotnet.darc": {
6-
"version": "1.1.0-beta.24367.3",
6+
"version": "1.1.0-beta.25113.5",
77
"commands": [
88
"darc"
99
]

.config/tsaoptions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"instanceUrl": "https://devdiv.visualstudio.com/",
3+
"template": "TFSDEVDIV",
4+
"projectName": "DEVDIV",
5+
"areaPath": "DevDiv\\NET Tools\\SDK",
6+
"iterationPath": "DevDiv",
7+
"notificationAliases": [ "[email protected]" ],
8+
"repositoryName": "dotnet-sdk",
9+
"codebaseName": "dotnet-sdk"
10+
}

.devcontainer/vmr/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// The container supports source-building the SDK
44
{
55
"name": "VMR with PR changes",
6-
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39",
6+
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9",
77
"hostRequirements": {
88
// A completely source built .NET is >64 GB with all the repos/artifacts
99
"storage": "128gb"

.devcontainer/vmr/init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ vmr_branch=$(git -C "$sdk_dir" log --pretty=format:'%D' HEAD^ \
2525
| sed 's@origin/@@' \
2626
| sed 's@,.*@@')
2727

28-
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug
28+
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --ci --debug
2929

30-
(cd "$vmr_dir" && ./prep-source-build.sh)
30+
cd "$vmr_dir"

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
###############################################################################
1111
*.xlf linguist-generated=true
1212

13+
###############################################################################
14+
# Set default behavior to:
15+
# don't collapse these files in PRs
16+
###############################################################################
17+
**/build/** linguist-generated=false
18+
1319
###############################################################################
1420
# Set file behavior to:
1521
# treat as text
@@ -61,3 +67,5 @@
6167
*.verified.txt text eol=lf working-tree-encoding=UTF-8
6268
*.verified.xml text eol=lf working-tree-encoding=UTF-8
6369
*.verified.json text eol=lf working-tree-encoding=UTF-8
70+
71+
src/SourceBuild/patches/**/*.patch text eol=lf
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Add Branch Lockdown Label to PRs
2+
3+
on:
4+
pull_request_target:
5+
workflow_dispatch: # Allows manual triggering of the workflow
6+
7+
permissions:
8+
actions: write # For managing the operation state cache
9+
issues: write
10+
11+
jobs:
12+
add-label:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Install jq
24+
run: sudo apt-get install -y jq
25+
26+
- name: Add label to PRs
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
# Determine the third Tuesday of the current month
31+
third_tuesday=$(date -d "$(date +%Y-%m-01) +14 days" +%Y-%m-%d)
32+
while [ $(date -d "$third_tuesday" +%u) -ne 2 ]; do
33+
third_tuesday=$(date -d "$third_tuesday + 1 day" +%Y-%m-%d)
34+
done
35+
36+
# Determine the first Tuesday of the current month
37+
first_tuesday=$(date -d "$(date +%Y-%m-01)" +%Y-%m-%d)
38+
while [ $(date -d "$first_tuesday" +%u) -ne 2 ]; do
39+
first_tuesday=$(date -d "$first_tuesday + 1 day" +%Y-%m-%d)
40+
done
41+
42+
# Get current date
43+
current_date=$(date +%Y-%m-%d)
44+
45+
echo "Current Date: $current_date"
46+
echo "Third Tuesday of the month: $third_tuesday"
47+
echo "First Tuesday of the month: $first_tuesday"
48+
49+
# Check if the current date is after the third Tuesday of this month or before the first Tuesday of this month
50+
if [[ "$current_date" > "$third_tuesday" || "$current_date" < "$first_tuesday" ]]; then
51+
echo "Within the label period. Checking if the branch matches..."
52+
53+
# Get all open PRs targeting branches release/8* and release/9* excluding release/9.0.3xx
54+
echo "Running gh pr list query..."
55+
prs=$(gh pr list --state open --limit 200 --json number,baseRefName,author,labels)
56+
echo "Total PRs Count: $(echo "$prs" | jq length)"
57+
echo "PRs JSON: $prs"
58+
59+
echo "Filtering PRs targeting release/8* and release/9* excluding release/9.0.3xx..."
60+
prs_targeting_branches=$(echo "$prs" | jq '[.[] | select(.baseRefName | test("^release/[89].*")) | select(.baseRefName | test("^release/9.0.3xx") | not)]')
61+
echo "Count of PRs targeting specific branches: $(echo "$prs_targeting_branches" | jq length)"
62+
63+
echo "Filtering PRs without Branch Lockdown label..."
64+
filtered_prs=$(echo "$prs_targeting_branches" | jq '[.[] | select(.labels | map(.name) | index("Branch Lockdown") | not) | .number]')
65+
echo "Filtered PRs without Branch Lockdown label JSON: $filtered_prs"
66+
echo "Count of Filtered PRs without Branch Lockdown label: $(echo "$filtered_prs" | jq length)"
67+
68+
# Loop through filtered PRs and add label
69+
for pr in $(echo "$filtered_prs" | jq -r '.[]'); do
70+
echo "Adding label to PR #$pr"
71+
gh pr edit $pr --add-label "Branch Lockdown"
72+
done
73+
else
74+
echo "Outside the label period. No labels added."
75+
fi

.github/workflows/pr-analysis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PR Analysis
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, labeled, unlabeled]
5+
permissions:
6+
contents: read
7+
pull-requests: read
8+
jobs:
9+
allowed-labels:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Return error if branch is in lockdown or 'do not merge' label is present
13+
run: echo "Labels on this PR prevent it from being merged. Please contact the repo owners for more information." && exit 1
14+
if: ${{ contains(github.event.pull_request.labels.*.name, 'Branch Lockdown') || contains(github.event.pull_request.labels.*.name, 'DO NOT MERGE') }}

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
inputs:
99
daysBeforeStale:
1010
required: true
11-
default: "2192"
11+
default: "1827"
1212
daysBeforeClose:
1313
required: true
1414
default: "30"

.vsts-ci.yml

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ extends:
6666
containers:
6767
alpine319WithNode:
6868
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
69-
cblMariner20Fpm:
70-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
7169
centosStream9:
7270
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
7371
debian12Amd64:
@@ -76,13 +74,17 @@ extends:
7674
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
7775
mariner20CrossArm:
7876
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
79-
ubuntu2204DebPkg:
80-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
8177
sdl:
8278
sourceAnalysisPool:
8379
name: $(DncEngInternalBuildPool)
8480
image: 1es-windows-2022
8581
os: windows
82+
policheck:
83+
enabled: true
84+
tsa:
85+
enabled: true
86+
binskim:
87+
enabled: true
8688
${{ if or(eq(parameters.runTestBuild, true), eq(variables['Build.Reason'], 'PullRequest')) }}:
8789
componentgovernance:
8890
# Refdoc: https://docs.opensource.microsoft.com/tools/cg/component-detection/variables/
@@ -106,6 +108,10 @@ extends:
106108
publishTaskPrefix: 1ES.
107109
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
108110
locBranch: release/9.0.3xx
111+
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
112+
preSteps:
113+
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
114+
displayName: Create artifacts/bin directory
109115
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
110116
timeoutInMinutes: 90
111117
windowsJobParameterSets:
@@ -201,21 +207,20 @@ extends:
201207
runTests: false
202208
### PORTABLE ###
203209
- categoryName: Portable
204-
container: ubuntu2204DebPkg
205210
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
206211
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
207212
officialBuildProperties: $(_officialBuildProperties)
208213
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
209214
runTests: false
210215
- categoryName: Portable
211-
container: cblMariner20Fpm
216+
container: centosStream9
212217
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
213218
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
214219
officialBuildProperties: $(_officialBuildProperties)
215220
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
216221
runTests: false
217222
- categoryName: Portable
218-
container: cblMariner20Fpm
223+
container: centosStream9
219224
buildArchitecture: arm64
220225
runtimeIdentifier: linux-arm64
221226
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
@@ -306,16 +311,6 @@ extends:
306311
buildArchitecture: arm64
307312
runtimeIdentifier: osx-arm64
308313

309-
############### SOURCE BUILD ###############
310-
- template: /eng/common/templates-official/job/source-build.yml@self
311-
parameters:
312-
enableInternalSources: true
313-
platform:
314-
name: Managed
315-
container: centosStream9
316-
jobProperties:
317-
timeoutInMinutes: 30
318-
319314
############### DOTNET-FORMAT ###############
320315
- ${{ if or(eq(parameters.runTestBuild, true), eq(variables['Build.Reason'], 'PullRequest')) }}:
321316
- template: /eng/dotnet-format/dotnet-format-integration.yml@self
@@ -338,26 +333,3 @@ extends:
338333
name: $(DncEngInternalBuildPool)
339334
image: 1es-windows-2022
340335
os: windows
341-
342-
############### POST-BUILD STAGE ###############
343-
- template: /eng/common/templates-official/post-build/post-build.yml@self
344-
parameters:
345-
publishingInfraVersion: 3
346-
enableSymbolValidation: false
347-
enableSigningValidation: false
348-
enableNugetValidation: false
349-
enableSourceLinkValidation: false
350-
publishInstallersAndChecksums: true
351-
publishAssetsImmediately: true
352-
SDLValidationParameters:
353-
enable: false
354-
params: ' -SourceToolsList @("policheck","credscan")
355-
-TsaInstanceURL $(_TsaInstanceURL)
356-
-TsaProjectName $(_TsaProjectName)
357-
-TsaNotificationEmail $(_TsaNotificationEmail)
358-
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
359-
-TsaBugAreaPath $(_TsaBugAreaPath)
360-
-TsaIterationPath $(_TsaIterationPath)
361-
-TsaRepositoryName "dotnet-sdk"
362-
-TsaCodebaseName "dotnet-sdk"
363-
-TsaPublish $True'

.vsts-pr.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ pr:
88
- main
99
- release/*
1010
- internal/release/*
11+
paths:
12+
exclude:
13+
- documentation/*
14+
- README.md
15+
- CODEOWNERS
1116

1217
parameters:
1318
- name: enableArm64Job
@@ -78,15 +83,5 @@ stages:
7883
buildArchitecture: arm64
7984
runtimeIdentifier: osx-arm64
8085

81-
############### SOURCE BUILD ###############
82-
- template: /eng/common/templates/job/source-build.yml
83-
parameters:
84-
enableInternalSources: true
85-
platform:
86-
name: Managed
87-
container: centosStream9
88-
jobProperties:
89-
timeoutInMinutes: 30
90-
9186
############### DOTNET-FORMAT ###############
9287
- template: /eng/dotnet-format/dotnet-format-integration.yml

0 commit comments

Comments
 (0)