Skip to content

Commit dcc0541

Browse files
authored
Make the SB mirroring pipeline work for 8.0 (#3243)
2 parents bd45f37 + a83ac21 commit dcc0541

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

eng/source-build-pre-release-8.0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pool:
88
resources:
99
pipelines:
1010
- pipeline: dotnet-staging-pipeline-resource
11-
source: Stage-DotNet-Test
11+
source: Stage-DotNet
1212

1313
parameters:
1414
- name: useSpecificPipelineRunIDs

eng/source-build-release-mirror.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ parameters:
2020
variables:
2121
- group: DotNet-Source-Build-All-Orgs-Source-Access
2222
- name: RepoDir
23-
value: 'vmr'
23+
value: vmr
2424
- name: GitUser
25-
value: 'dn-bot'
25+
value: dn-bot
2626
- name: GitEmail
27-
27+
2828

2929
jobs:
3030
- ${{ each mirror in parameters.mirrors }}:
3131
- job:
32+
displayName: Mirror ${{ mirror.sourceUrl }}
3233
steps:
3334
- checkout: none
3435

@@ -39,11 +40,13 @@ jobs:
3940
git init "${repo_dir}"
4041
cd "${repo_dir}"
4142
43+
echo "Setting up git in ${repo_dir} repo for ${{ mirror.sourceUrl }} -> ${{ mirror.destinationUrl }}"
44+
4245
git config --global user.name "${{ variables.GitUser }}"
4346
git config --global user.email "${{ variables.GitEmail }}"
4447
45-
source_url=$(echo "${{ mirror.sourceUrl }}" | sed "s,https://.*@,https://${{ variables.GitUser }}:${AZDO_PAT}@,g")
46-
destination_url=$(echo "${{ mirror.destinationUrl }}" | sed "s,https://.*@,https://${{ variables.GitUser }}:${AZDO_PAT}@,g")
48+
source_url=$(echo '${{ mirror.sourceUrl }}' | sed "s,https://.*@,https://${{ variables.GitUser }}:${AZDO_PAT}@,g")
49+
destination_url=$(echo '${{ mirror.destinationUrl }}' | sed "s,https://.*@,https://${{ variables.GitUser }}:${AZDO_PAT}@,g")
4750
4851
git remote add source "${source_url}"
4952
git remote add destination "${destination_url}"
@@ -62,7 +65,7 @@ jobs:
6265
message=".NET Source-build ${{ branch.sdkVersion }}-SDK"
6366
git tag "${tag_name}" HEAD -m "${message}"
6467
65-
git fetch destination "${{ branch.name }}"
68+
git fetch destination '${{ branch.name }}' || echo 'Branch ${{ branch.name }} does not exist in destination yet'
6669
6770
git push --follow-tags destination "${{ branch.name }}"
6871
workingDirectory: $(Pipeline.Workspace)/$(RepoDir)

0 commit comments

Comments
 (0)