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
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
source ./eng/common/tools.sh
|
|
|
|
InitializeDotNetCli true
|
|
|
|
./.dotnet/dotnet tool restore
|
|
|
|
displayName: Restore darc
|
|
|
|
workingDirectory: $(Agent.BuildDirectory)/installer
|
|
|
|
|
2022-12-20 18:24:30 +00:00
|
|
|
- script: |
|
|
|
|
git checkout -B ${{ parameters.vmrBranch }}
|
|
|
|
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
|
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
|
|
|
|
2022-12-01 09:51:39 +00:00
|
|
|
# This step make sure that darc finds the PR commit (which might be in a fork of installer)
|
|
|
|
# The cloned folder does have the commit so we copy it into temp where the tooling will find it
|
|
|
|
# We also cannot keep the AzDO remote as pulling from it would require a token
|
|
|
|
- script: |
|
|
|
|
cp -r $(Agent.BuildDirectory)/installer $(Agent.TempDirectory)/03298978DFFFCD23
|
|
|
|
cd $(Agent.TempDirectory)/03298978DFFFCD23
|
|
|
|
git remote remove origin
|
|
|
|
git remote add origin https://github.com/dotnet/installer
|
|
|
|
displayName: Prepare dotnet/installer clone
|
2022-11-08 16:47:32 +00:00
|
|
|
|
|
|
|
- script: >
|
|
|
|
$(Agent.BuildDirectory)/installer/.dotnet/dotnet darc vmr update
|
|
|
|
--vmr ${{ parameters.vmrPath }}
|
|
|
|
--tmp $(Agent.TempDirectory)
|
2022-12-01 09:51:39 +00:00
|
|
|
--github-pat $(BotAccount-dotnet-bot-repo-PAT)
|
2022-11-08 16:47:32 +00:00
|
|
|
--recursive
|
|
|
|
--verbose
|
|
|
|
installer:${{ parameters.targetRef }}
|
|
|
|
displayName: Synchronize dotnet/dotnet
|
|
|
|
workingDirectory: $(Agent.BuildDirectory)/installer
|