Skip to content

Commit fb3fdf9

Browse files
authored
Fix some issues of ci-pipeline (#18973)
1 parent 143d24b commit fb3fdf9

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

.ci-config.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
"LICENSE.txt",
6262
"README.md",
6363
"ChangeLog.md",
64-
"**/ChangeLog.md",
65-
"**/readme.md",
66-
"src/**/document/*",
64+
"*/ChangeLog.md",
65+
"*/readme.md",
66+
"src/*/document/*",
6767
".ci-config.json",
6868
"tools/PrepareAutorestModule.ps1",
6969
"tools/SyncFromMainBranch.ps1",
@@ -84,7 +84,7 @@
8484
},
8585
{
8686
"patterns": [
87-
"src/{ModuleName}/**/*.md$"
87+
"src/{ModuleName}/*/*.md$"
8888
],
8989
"phases": [
9090
"build:module",
@@ -93,7 +93,7 @@
9393
},
9494
{
9595
"patterns": [
96-
"src/{ModuleName}/**/*.csproj$"
96+
"src/{ModuleName}/*/*.csproj$"
9797
],
9898
"phases": [
9999
"build:related-module",

tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/CIFilterTask.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private bool ProcessTargetModule(Dictionary<string, string[]> csprojMap)
240240

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

246246
private Dictionary<string, HashSet<string>> CalculateInfluencedModuleInfoForEachPhase(List<(Regex, List<string>)> ruleList, Dictionary<string, string[]> csprojMap)
@@ -462,17 +462,7 @@ public override bool Execute()
462462
}
463463
else
464464
{
465-
Dictionary<string, HashSet<string>> influencedModuleInfo = new Dictionary<string, HashSet<string>>
466-
{
467-
[BUILD_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
468-
[ANALYSIS_BREAKING_CHANGE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
469-
[ANALYSIS_DEPENDENCY_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
470-
[ANALYSIS_HELP_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
471-
[ANALYSIS_SIGNATURE_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME },
472-
[TEST_PHASE] = new HashSet<string>() { ACCOUNT_MODULE_NAME }
473-
};
474-
FilterTaskResult.PhaseInfo = CalculateCsprojForBuildAndTest(influencedModuleInfo, csprojMap);
475-
return true;
465+
return false;
476466
}
477467
}
478468
return true;

tools/PrepareAutorestModule.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ foreach ($file in $ChangedFiles)
4646
}
4747
if ($ModuleSet.Contains($ALL_MODULE))
4848
{
49-
$ModuleList = (Get-ChildItem "$PSScriptRoot\..\src\" -Directory -Exclude helpers,lib).Name | Where-Object { $SKIP_MODULES -notcontains $_ -and (Get-Item env:SELECTEDMODULELIST).Value.Split(';') -contains $_ }
49+
$Null = $ModuleSet.Remove($ALL_MODULE)
50+
$SelectedModuleList = (Get-ChildItem "$PSScriptRoot\..\src\").Name | Where-Object { (Get-Item env:SELECTEDMODULELIST).Value.Split(';') -contains $_ }
51+
$Null = $ModuleSet.Add($SelectedModuleList)
52+
$ModuleList = $ModuleSet | Where-Object { $SKIP_MODULES -notcontains $_ }
5053
}
5154
else
5255
{

0 commit comments

Comments
 (0)