Skip to content

Commit

Permalink
[release/8.0.1xx] Fix internal VMR PR builds (#17208)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored Aug 17, 2023
1 parent 2ad28c8 commit 001d8e4
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"microsoft.dotnet.darc": {
"version": "1.1.0-beta.23374.1",
"version": "1.1.0-beta.23416.3",
"commands": [
"darc"
]
Expand Down
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>d3b8861e20aaf0179034c6076d156e2442b26f9b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23374.1">
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.23416.3">
<Uri>https://github.com/dotnet/arcade-services</Uri>
<Sha>47ed0ea4d789d359d3749707374d7a5edd84eb19</Sha>
<Sha>5d63a226d022fda90cae2c239e882ad253baa758</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.23374.1">
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.23416.3">
<Uri>https://github.com/dotnet/arcade-services</Uri>
<Sha>47ed0ea4d789d359d3749707374d7a5edd84eb19</Sha>
<Sha>5d63a226d022fda90cae2c239e882ad253baa758</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="8.0.0-alpha.1.22557.12">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade-services -->
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.23374.1</MicrosoftDotNetDarcLibVersion>
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.23416.3</MicrosoftDotNetDarcLibVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/winforms -->
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- template: /eng/common/templates/variables/pool-providers.yml
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
- ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal'), not(startswith(parameters.vmrBranch, 'internal/release/'))) }}:
- ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal'), not(startswith(parameters.vmrBranch, 'internal/release/')), not(eq(variables['Build.Reason'], 'PullRequest'))) }}:
- group: DotNetBot-GitHub
- ${{ else }}:
- name: BotAccount-dotnet-bot-repo-PAT
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/steps/vmr-pull-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ steps:
./eng/vmr-sync.sh
--vmr ${{ parameters.vmrPath }}
--tmp $(Agent.TempDirectory)
--azdev-pat '$(System.AccessToken)'
--branch ${{ parameters.vmrBranch }}
--repository "installer:${{ parameters.targetRef }}"
--recursive
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/vmr-build-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resources:
- repository: vmr
type: git
name: dotnet-dotnet
ref: $(VmrBranch)
ref: ${{ variables.VmrBranch }}

stages:
# You can temporarily disable the VMR Build stage by changing the default of disableVmrBuild
Expand Down
13 changes: 13 additions & 0 deletions eng/vmr-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
### Optional. Template for the header of VMRs THIRD-PARTY-NOTICES file.
### Defaults to src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
###
### --azdev-pat
### Optional. Azure DevOps PAT to use for cloning private repositories.
###
### -v, --vmr, --vmr-dir PATH
### Optional. Path to the dotnet/dotnet repository. When null, gets cloned to the temporary folder

Expand Down Expand Up @@ -102,6 +105,7 @@ recursive=false
verbosity=verbose
readme_template="$installer_dir/src/VirtualMonoRepo/README.template.md"
tpn_template="$installer_dir/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt"
azdev_pat=''

# If installer is a repo, we're in an installer and not in the dotnet/dotnet repo
if [[ -d "$installer_dir/.git" ]]; then
Expand Down Expand Up @@ -142,6 +146,10 @@ while [[ $# -gt 0 ]]; do
tpn_template=$2
shift
;;
--azdev-pat)
azdev_pat=$2
shift
;;
-d|--debug)
verbosity=debug
;;
Expand Down Expand Up @@ -245,11 +253,16 @@ if [[ -n "$additional_remotes" ]]; then
additional_remotes="--additional-remotes $additional_remotes"
fi

if [[ -n "$azdev_pat" ]]; then
azdev_pat="--azdev-pat $azdev_pat"
fi

# Synchronize the VMR

"$dotnet" darc vmr update \
--vmr "$vmr_dir" \
--tmp "$tmp_dir" \
$azdev_pat \
--$verbosity \
$recursive_arg \
--readme-template "$readme_template" \
Expand Down

0 comments on commit 001d8e4

Please sign in to comment.