Skip to content

Commit

Permalink
Fix some issues of ci-pipeline (#18973)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyunchi-ms authored Jul 19, 2022
1 parent 143d24b commit fb3fdf9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .ci-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
"LICENSE.txt",
"README.md",
"ChangeLog.md",
"**/ChangeLog.md",
"**/readme.md",
"src/**/document/*",
"*/ChangeLog.md",
"*/readme.md",
"src/*/document/*",
".ci-config.json",
"tools/PrepareAutorestModule.ps1",
"tools/SyncFromMainBranch.ps1",
Expand All @@ -84,7 +84,7 @@
},
{
"patterns": [
"src/{ModuleName}/**/*.md$"
"src/{ModuleName}/*/*.md$"
],
"phases": [
"build:module",
Expand All @@ -93,7 +93,7 @@
},
{
"patterns": [
"src/{ModuleName}/**/*.csproj$"
"src/{ModuleName}/*/*.csproj$"
],
"phases": [
"build:related-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private bool ProcessTargetModule(Dictionary<string, string[]> csprojMap)

private string ProcessSinglePattern(string pattern)
{
return pattern.Replace("**", ".*").Replace("{ModuleName}", "(?<ModuleName>[^/]+)");
return pattern.Replace(".", "\\.").Replace("*", ".*").Replace("{ModuleName}", "(?<ModuleName>[^/]+)");
}

private Dictionary<string, HashSet<string>> CalculateInfluencedModuleInfoForEachPhase(List<(Regex, List<string>)> ruleList, Dictionary<string, string[]> csprojMap)
Expand Down Expand Up @@ -462,17 +462,7 @@ public override bool Execute()
}
else
{
Dictionary<string, HashSet<string>> influencedModuleInfo = new Dictionary<string, HashSet<string>>
{
[BUILD_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_BREAKING_CHANGE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_DEPENDENCY_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_HELP_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[ANALYSIS_SIGNATURE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
[TEST_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME }
};
FilterTaskResult.PhaseInfo = CalculateCsprojForBuildAndTest(influencedModuleInfo, csprojMap);
return true;
return false;
}
}
return true;
Expand Down
5 changes: 4 additions & 1 deletion tools/PrepareAutorestModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ foreach ($file in $ChangedFiles)
}
if ($ModuleSet.Contains($ALL_MODULE))
{
$ModuleList = (Get-ChildItem "$PSScriptRoot\..\src\" -Directory -Exclude helpers,lib).Name | Where-Object { $SKIP_MODULES -notcontains $_ -and (Get-Item env:SELECTEDMODULELIST).Value.Split(';') -contains $_ }
$Null = $ModuleSet.Remove($ALL_MODULE)
$SelectedModuleList = (Get-ChildItem "$PSScriptRoot\..\src\").Name | Where-Object { (Get-Item env:SELECTEDMODULELIST).Value.Split(';') -contains $_ }
$Null = $ModuleSet.Add($SelectedModuleList)
$ModuleList = $ModuleSet | Where-Object { $SKIP_MODULES -notcontains $_ }
}
else
{
Expand Down

0 comments on commit fb3fdf9

Please sign in to comment.