diff --git a/.azure/pipelines/azure-pipelines-mirror-within-azdo.yml b/.azure/pipelines/azure-pipelines-mirror-within-azdo.yml index 061eaf69c774..ad6faeb280d8 100644 --- a/.azure/pipelines/azure-pipelines-mirror-within-azdo.yml +++ b/.azure/pipelines/azure-pipelines-mirror-within-azdo.yml @@ -33,11 +33,13 @@ jobs: value: repo-dir - name: AzdoRepo value: dotnet-aspnetcore - - name: TargetBranchName - value: $(Build.SourceBranchName)-nonstable - - name: BranchToMirror - value: $(Build.SourceBranchName) steps: + - powershell: | + $branch = "$(Build.SourceBranch)".Replace("refs/heads/", ""); + $suffix = "-nonstable" + Write-Host "##vso[task.setvariable variable=BranchToMirror]$branch" + Write-Host "##vso[task.setvariable variable=TargetBranchName]$branch+$suffix" + displayName: Calculate Mirrored Branch Names - script: | git clone https://dn-bot:$(dn-bot-dnceng-build-rw-code-rw)@dev.azure.com/dnceng/internal/_git/$(AzdoRepo) $(WorkingDirectoryName) --recursive --no-tags --branch $(TargetBranchName) displayName: Clone AzDO repo