Skip to content

[BUG] /eng/scripts/Update-Mgmt-CI.ps1 doesn't work correctly under non-Windows #47438

Open
@archerzz

Description

@archerzz

Library name and version

eng ci script

Describe the bug

See this PR: #47422 which contains a lot of unexpected changes to ci.mgmt.yml, basically a repetitive content is inserted. The root cause is probably in

$ciContent = $ciContent -replace "(?s)(paths:\r\n(\s+)include:\r\n(?:\s+-[^\r\n]*\r\n)*(?:\s+-\s+$relServiceDir/?\r\n)(?:\s+-[^\r\n]*\r\n)*)(?!\s+exclude:)", "`$1`$2exclude:`r`n`$2- $relPackageDir`r`n"
which doesn't work correctly under non-Windows environment.

Expected behavior

/eng/scripts/Update-Mgmt-CI.ps1 should work correctly under non-Windows environment.

Actual behavior

Due to regex matching failure, a repetitive content will be inserted in ci.mgmt.yml of each sdk.

Reproduction Steps

Run /eng/scripts/Update-Mgmt-CI.ps1 under non-Windows environment

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EngSysThis issue is impacting the engineering system.Mgmt-EngSysEngineering System (Management Plane Specific)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions