Merge pull request #14742 from dotnet-maestro-bot/merge/release/6.0.3xx-to-release/6.0.4xx

[automated] Merge branch 'release/6.0.3xx' => 'release/6.0.4xx'
This commit is contained in:
Marc Paine 2022-10-12 15:30:16 -07:00 committed by GitHub
commit 216b75ce9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 30 deletions

View file

@ -375,10 +375,11 @@ stages:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml # For .NET 6.0, source-build only supports 6.0.1xx. Disable tarball build validation in all other branches.
parameters: # - ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
dependsOn: Source_Build_Create_Tarball # - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true') # parameters:
# dependsOn: Source_Build_Create_Tarball
# https://github.com/dotnet/core-sdk/issues/248 # https://github.com/dotnet/core-sdk/issues/248
# - template: /eng/build.yml # - template: /eng/build.yml

View file

@ -74,18 +74,3 @@ jobs:
displayName: Publish BuildLogs displayName: Publish BuildLogs
continueOnError: true continueOnError: true
condition: succeededOrFailed() condition: succeededOrFailed()
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
# Check if the tarball should be built now so the result can be used in the build tarball job condition.
# This prevents allocation of additional agents if the tarball build legs should be skipped.
# Only build the tarball if the PR touches source-build source.
- script: |
# Temporarily disable tarball PR validation until source-build is supported in this channel.
echo "##vso[task.setvariable variable=_includeTarballBuild;isoutput=true]false"
# if curl "https://api.github.com/repos/dotnet/installer/pulls/$(System.PullRequest.PullRequestNumber)/files" | grep '"filename": "src/SourceBuild/*'
# then
# echo "##vso[task.setvariable variable=_includeTarballBuild;isoutput=true]true"
# fi
displayName: Tarball Build Check
name: Tarball_Build_Check

View file

@ -1,9 +1,6 @@
# Builds a source-build tarball # Builds a source-build tarball
parameters: parameters:
# Custom condition to apply to the job
condition: true
# Dependent jobs that must be completed before this job will run # Dependent jobs that must be completed before this job will run
dependsOn: dependsOn:
@ -32,7 +29,6 @@ jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters: parameters:
architecture: x64 architecture: x64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }} dependsOn: ${{ parameters.dependsOn }}
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
excludeSdkContentTests: true excludeSdkContentTests: true
@ -86,7 +82,6 @@ jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters: parameters:
architecture: arm64 architecture: arm64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }} dependsOn: ${{ parameters.dependsOn }}
${{ if in(variables['Build.Reason'], 'PullRequest') }}: ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
excludeSdkContentTests: true excludeSdkContentTests: true
@ -108,7 +103,7 @@ jobs:
architecture: x64 architecture: x64
# Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status. # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status.
# The bootstrap build will shortcut if the stage 1 build failed. # The bootstrap build will shortcut if the stage 1 build failed.
condition: and(${{ parameters.condition }}, succeededOrFailed()) condition: succeededOrFailed()
dependsOn: Build_Tarball_x64 dependsOn: Build_Tarball_x64
excludeSdkContentTests: true excludeSdkContentTests: true
installerBuildResourceId: ${{ parameters.installerBuildResourceId }} installerBuildResourceId: ${{ parameters.installerBuildResourceId }}

View file

@ -96,7 +96,7 @@ internal class DotNetHelper
} }
} }
public void ExecuteCmd(string args, string? workingDirectory = null, Action<Process>? additionalProcessConfigCallback = null, int expectedExitCode = 0, int millisecondTimeout = -1) public void ExecuteCmd(string args, string? workingDirectory = null, Action<Process>? additionalProcessConfigCallback = null, int? expectedExitCode = 0, int millisecondTimeout = -1)
{ {
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess( (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(
DotNetPath, DotNetPath,
@ -105,7 +105,9 @@ internal class DotNetHelper
configure: (process) => configureProcess(process, workingDirectory), configure: (process) => configureProcess(process, workingDirectory),
millisecondTimeout: millisecondTimeout); millisecondTimeout: millisecondTimeout);
ExecuteHelper.ValidateExitCode(executeResult, expectedExitCode); if (expectedExitCode != null) {
ExecuteHelper.ValidateExitCode(executeResult, (int) expectedExitCode);
}
void configureProcess(Process process, string? workingDirectory) void configureProcess(Process process, string? workingDirectory)
{ {

View file

@ -19,12 +19,11 @@ public class DotNetWatchTests : SmokeTests
string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests)); string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests));
bool outputChanged = false; bool outputChanged = false;
// We expect an exit code of 143 (128 + 15, i.e. SIGTERM) because we are killing the process manually
DotNetHelper.ExecuteCmd( DotNetHelper.ExecuteCmd(
"watch run", "watch run",
workingDirectory: projectDirectory, workingDirectory: projectDirectory,
additionalProcessConfigCallback: processConfigCallback, additionalProcessConfigCallback: processConfigCallback,
expectedExitCode: 143, expectedExitCode: null, // The exit code does not reflect whether or not dotnet watch is working properly
millisecondTimeout: 30000); millisecondTimeout: 30000);
Assert.True(outputChanged); Assert.True(outputChanged);
@ -52,7 +51,7 @@ public class DotNetWatchTests : SmokeTests
{ {
outputChanged = true; outputChanged = true;
OutputHelper.WriteLine("Successfully re-ran program after code change."); OutputHelper.WriteLine("Successfully re-ran program after code change.");
ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", OutputHelper); process.Kill(true);
} }
}); });
} }