dotnet-installer/eng/pipelines/templates/steps/vmr-pull-updates.yml
Přemek Vysoký 87955496af
Use VMR instead of the tarball for Source-Build builds (#15042)
For PRs, the Source-Build leg that was running inside of the Build stage is now moved to a separate stage but runs more or less the same: https://dev.azure.com/dnceng-public/public/_build/results?buildId=97509&view=results
Instead of creating the tarball, we are building the `dotnet/dotnet` repo there.

For internal rolling builds, we are taking [this pipeline](https://dev.azure.com/dnceng/internal/_build/results?buildId=2056327&view=results) and merging it into `dotnet-installer-official-ci`.
So it's one extra stage that runs pretty quick (faster than the Build stage by far).
It won't be creating and pushing the tarball artifact anymore though.

Once the rolling build is finished, there won't be no more source-build-build pipeline but instead dotnet-dotnet-official-ci which will build the dotnet/dotnet repo again instead of the tarball that was originally produced from the rolling build.
The MSFT SDK from the installer build will still be consumed by it though.

More details https://github.com/dotnet/arcade/issues/10677
2022-12-01 10:51:39 +01:00

55 lines
1.9 KiB
YAML

### 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
- script: git checkout -B ${{ parameters.vmrBranch }}
displayName: Prepare branch ${{ parameters.vmrBranch }}
workingDirectory: ${{ parameters.vmrPath }}
# 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
- script: >
$(Agent.BuildDirectory)/installer/.dotnet/dotnet darc vmr update
--vmr ${{ parameters.vmrPath }}
--tmp $(Agent.TempDirectory)
--github-pat $(BotAccount-dotnet-bot-repo-PAT)
--recursive
--verbose
installer:${{ parameters.targetRef }}
displayName: Synchronize dotnet/dotnet
workingDirectory: $(Agent.BuildDirectory)/installer