Skip to content

Commit

Permalink
Add log for filtering projects to build (#11561)
Browse files Browse the repository at this point in the history
* add build detail for checking why CI all all tests

* add pipeline variables for build log
  • Loading branch information
erich-wang authored Apr 13, 2020
1 parent 111ff0e commit 9d87e15
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ variables:
TestFramework: netcoreapp2.2
TestTarget: Test
Configuration: Debug
DebugLocalBuildTasks: true

jobs:
- job: Build
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/windows-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ variables:
TestFramework: netcoreapp2.2
TestTarget: Test
Configuration: Debug
DebugLocalBuildTasks: true

jobs:
- job: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,18 @@ public override bool Execute()
}

var debugEnvironmentVariable = Environment.GetEnvironmentVariable("DebugLocalBuildTasks");
Console.WriteLine("DebugLocalBuildTasks:" + debugEnvironmentVariable);
bool debug;
if (!Boolean.TryParse(debugEnvironmentVariable, out debug))
{
debug = false;
}

if (debug)
{
Console.WriteLine("PullRequestNumber:" + PullRequestNumber);
}

int ParsedPullRequestNumber;

// The next statement will convert the string representation of a number to its integer equivalent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ public override bool Execute()
}
else
{
if (debug)
{
Console.WriteLine("Debug: ModuleMapping.json");
var lines = File.ReadAllLines(MapFilePath);
foreach (var line in lines)
{
Console.WriteLine(line);
}
}
var set = new HashSet<string>();
var dictionary = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(File.ReadAllText(MapFilePath));
foreach (KeyValuePair<string, string[]> pair in dictionary)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="$(MSBuildThisFileDirectory)..\..\..\Repo.props" />

Expand All @@ -23,7 +23,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Octokit" Version="0.32.0" />
<PackageReference Include="Octokit" Version="0.46.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 9d87e15

Please sign in to comment.