diff --git a/eng/pipelines/templates/steps/sync-repo-branch.yml b/eng/pipelines/templates/steps/sync-repo-branch.yml index d03a91b764f..fbb0c5ff069 100644 --- a/eng/pipelines/templates/steps/sync-repo-branch.yml +++ b/eng/pipelines/templates/steps/sync-repo-branch.yml @@ -26,11 +26,10 @@ parameters: steps: - ${{ each repo in parameters.Repos }}: - - ${{ each target in repo.value.TargetRepos }}: - - task: PowerShell@2 displayName: Sync Repo from ${{ repo.key }} to ${{ target.key }} + continueOnError: true inputs: pwsh: true workingDirectory: ${{ parameters.WorkingDirectory }} diff --git a/eng/pipelines/templates/steps/sync-repo-merge-branch.yml b/eng/pipelines/templates/steps/sync-repo-merge-branch.yml index cbab29ac3c1..ad55db430d6 100644 --- a/eng/pipelines/templates/steps/sync-repo-merge-branch.yml +++ b/eng/pipelines/templates/steps/sync-repo-merge-branch.yml @@ -44,6 +44,7 @@ steps: - task: PowerShell@2 displayName: Merge branch from ${{ repo.value.Branch }} into ${{ target.key }} + continueOnError: true inputs: pwsh: true workingDirectory: ${{ parameters.WorkingDirectory }}/${{ repo.key }} @@ -79,6 +80,7 @@ steps: Write-Host "gh pr merge $mergeBranch --auto --merge --repo ${{ repo.key }}" gh pr merge $mergeBranch --auto --merge --repo ${{ repo.key }} displayName: Create Pull Request for merge + continueOnError: true workingDirectory: ${{ parameters.WorkingDirectory }}/${{ repo.key }} env: GH_TOKEN: $(azuresdk-github-pat) diff --git a/eng/scripts/Merge-Branch.ps1 b/eng/scripts/Merge-Branch.ps1 index 14aaaa98e27..2cb01cfef57 100644 --- a/eng/scripts/Merge-Branch.ps1 +++ b/eng/scripts/Merge-Branch.ps1 @@ -56,8 +56,8 @@ if ($LASTEXITCODE -and -not $mergeOutput.EndsWith('Automatic merge failed; fix c # update paths matching "theirs", except for "ours" and "merge", to the state in $SourceBranch if ($Theirs.Length) { - Write-Verbose "git restore -s $SourceBranch --worktree --theirs -- $theirIncludes $ourExcludes $mergeExcludes" - git restore -s $SourceBranch --worktree --theirs -- $theirIncludes $ourExcludes $mergeExcludes + Write-Verbose "git restore -s $SourceBranch --worktree --ignore-unmerged -- $theirIncludes $ourExcludes $mergeExcludes" + git restore -s $SourceBranch --worktree --ignore-unmerged -- $theirIncludes $ourExcludes $mergeExcludes if ($LASTEXITCODE) { ErrorExit $LASTEXITCODE } Write-Verbose "git add -A" git add -A @@ -66,8 +66,8 @@ if ($Theirs.Length) { # update paths matching "ours", except for "merge", to their pre-merge state if ($Ours.Length) { - Write-Verbose "git restore -s (git rev-parse HEAD) --worktree --theirs -- $ourIncludes $mergeExcludes" - git restore -s (git rev-parse HEAD) --worktree --theirs -- $ourIncludes $mergeExcludes + Write-Verbose "git restore -s (git rev-parse HEAD) --worktree --ignore-unmerged -- $ourIncludes $mergeExcludes" + git restore -s (git rev-parse HEAD) --worktree --ignore-unmerged -- $ourIncludes $mergeExcludes if ($LASTEXITCODE) { ErrorExit $LASTEXITCODE } Write-Verbose "git add -A" git add -A @@ -75,8 +75,8 @@ if ($Ours.Length) { } if ($AcceptTheirsForFinalMerge) { - Write-Verbose "git restore -s $SourceBranch --worktree --theirs -- $mergeIncludes" - git restore -s $SourceBranch --worktree --theirs -- $mergeIncludes + Write-Verbose "git restore -s $SourceBranch --worktree --ignore-unmerged -- $mergeIncludes" + git restore -s $SourceBranch --worktree --ignore-unmerged -- $mergeIncludes if ($LASTEXITCODE) { ErrorExit $LASTEXITCODE } Write-Verbose "git add -A" git add -A