2022-11-08 16:47:32 +00:00
|
|
|
### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet).
|
|
|
|
### They initialize the darc CLI and pull the new updates.
|
|
|
|
### Changes are applied locally onto the already cloned VMR (located in $vmrPath).
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
- name: vmrBranch
|
|
|
|
displayName: dotnet/dotnet branch to use
|
|
|
|
type: string
|
|
|
|
|
|
|
|
- name: targetRef
|
|
|
|
displayName: Target revision in dotnet/installer to synchronize
|
|
|
|
type: string
|
|
|
|
default: $(Build.SourceVersion)
|
|
|
|
|
|
|
|
- name: vmrPath
|
|
|
|
displayName: Path where the dotnet/dotnet is checked out to
|
|
|
|
type: string
|
|
|
|
default: $(Agent.BuildDirectory)/vmr
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
displayName: Clone dotnet/installer
|
|
|
|
path: installer
|
|
|
|
|
2023-11-06 12:50:53 +00:00
|
|
|
# This step is needed so that when we get a detached HEAD / shallow clone,
|
|
|
|
# we still pull the commit into the temporary installer clone to use it during the sync.
|
|
|
|
- script: |
|
|
|
|
git branch installer-head
|
2023-11-10 14:30:21 +00:00
|
|
|
git rev-parse HEAD
|
2023-11-06 12:50:53 +00:00
|
|
|
displayName: Label PR commit
|
|
|
|
workingDirectory: $(Agent.BuildDirectory)/installer
|
|
|
|
|
2022-12-20 18:24:30 +00:00
|
|
|
- script: |
|
2023-02-01 11:11:16 +00:00
|
|
|
git checkout -B ${{ parameters.vmrBranch }}
|
|
|
|
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
|
2023-11-27 15:39:11 +00:00
|
|
|
mkdir -p ${{ parameters.vmrPath }}/artifacts/x64/Release
|
2022-11-08 16:47:32 +00:00
|
|
|
displayName: Prepare branch ${{ parameters.vmrBranch }}
|
2022-12-01 09:51:39 +00:00
|
|
|
workingDirectory: ${{ parameters.vmrPath }}
|
2022-11-08 16:47:32 +00:00
|
|
|
|
2023-11-10 14:30:21 +00:00
|
|
|
- script: |
|
|
|
|
git config --global user.name "dotnet-maestro[bot]"
|
|
|
|
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"
|
|
|
|
displayName: Set git author to dotnet-maestro[bot]
|
|
|
|
workingDirectory: ${{ parameters.vmrPath }}
|
|
|
|
|
2023-11-27 15:39:11 +00:00
|
|
|
- script: |
|
|
|
|
echo '**/*' > .artifactignore
|
|
|
|
echo '!./*.patch' >> .artifactignore
|
|
|
|
displayName: Prepare .artifactignore
|
|
|
|
workingDirectory: $(Agent.TempDirectory)
|
|
|
|
|
2022-11-08 16:47:32 +00:00
|
|
|
- script: >
|
2023-01-09 13:28:34 +00:00
|
|
|
./eng/vmr-sync.sh
|
2022-11-08 16:47:32 +00:00
|
|
|
--vmr ${{ parameters.vmrPath }}
|
|
|
|
--tmp $(Agent.TempDirectory)
|
2023-08-21 08:57:01 +00:00
|
|
|
--azdev-pat '$(System.AccessToken)'
|
2023-02-01 11:11:16 +00:00
|
|
|
--branch ${{ parameters.vmrBranch }}
|
2023-02-17 16:39:17 +00:00
|
|
|
--repository "installer:${{ parameters.targetRef }}"
|
|
|
|
--recursive
|
2023-03-13 13:44:42 +00:00
|
|
|
--remote "installer:$(pwd)"
|
2023-02-08 12:44:25 +00:00
|
|
|
--readme-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/README.template.md
|
|
|
|
--tpn-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
|
2023-02-13 11:43:27 +00:00
|
|
|
--debug
|
2023-11-27 15:39:11 +00:00
|
|
|
||
|
|
|
|
(echo "##vso[task.logissue type=error]Failed to synchronize the VMR" && exit 1)
|
2022-11-08 16:47:32 +00:00
|
|
|
displayName: Synchronize dotnet/dotnet
|
|
|
|
workingDirectory: $(Agent.BuildDirectory)/installer
|
2023-11-27 15:39:11 +00:00
|
|
|
|
|
|
|
- publish: $(Agent.TempDirectory)
|
|
|
|
artifact: $(System.JobDisplayName)_FailedPatches
|
|
|
|
displayName: Upload failed patches
|
|
|
|
condition: failed()
|