diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 0e999414b..3d2a5db62 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "microsoft.dotnet.darc": { - "version": "1.1.0-beta.23101.1", + "version": "1.1.0-beta.23106.1", "commands": [ "darc" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cc3101d26..58ee52239 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -208,13 +208,13 @@ https://github.com/dotnet/arcade c453dfef2f41533de5cb03b2115aab9d0dfc74c6 - + https://github.com/dotnet/arcade-services - ef64ef0af25b1b29b4b5e0415788a0b7a1be004f + 8b6dc24326637735543511b2b5c5e6331adc293b - + https://github.com/dotnet/arcade-services - ef64ef0af25b1b29b4b5e0415788a0b7a1be004f + 8b6dc24326637735543511b2b5c5e6331adc293b https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 1618aa7a7..cdc4cd7ed 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -30,7 +30,7 @@ - 1.1.0-beta.23101.1 + 1.1.0-beta.23106.1 diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 8c7767ac7..0992b9d08 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -25,12 +25,16 @@ jobs: - template: /eng/common/templates/variables/pool-providers.yml - name: vmrPath value: $(Agent.BuildDirectory)/vmr - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - group: DotNetBot-GitHub - - ${{ else }}: - - name: BotAccount-dotnet-bot-repo-PAT - value: N/A - + - group: DotNetBot-GitHub-No-Scopes + - name: vmrPublicUrl + value: https://github.com/dotnet/dotnet + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}: + - group: DotNetBot-AzDO-PAT + - name: vmrInternalUrl + value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet + pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) @@ -51,17 +55,30 @@ jobs: vmrBranch: ${{ parameters.vmrBranch }} targetRef: ${{ parameters.targetRef }} - # For official builds, push the changes to the VMR - # Push only main and release branches + - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - - script: | - set -x - git config --global user.email 'dotnet-maestro[bot]@users.noreply.github.com' && git config --global user.name 'dotnet-maestro[bot]' - git remote add dotnet 'https://$(BotAccount-dotnet-bot-repo-PAT)@github.com/dotnet/dotnet.git' - git fetch dotnet - git branch ${{ parameters.vmrBranch }} - git branch --set-upstream-to=dotnet/${{ parameters.vmrBranch }} ${{ parameters.vmrBranch }} || echo 'Branch ${{ parameters.vmrBranch }} not found in remote' - git push dotnet ${{ parameters.vmrBranch }} - displayName: Push changes to dotnet/dotnet - workingDirectory: $(vmrPath) - condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) + # Push main and release branches to the public VMR + - ${{ if or(eq(parameters.vmrBranch, 'main'), startsWith(parameters.vmrBranch, 'release/')) }}: + - script: > + ./.dotnet/dotnet darc vmr push + --vmr '$(vmrPath)' + --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' + --branch '${{ parameters.vmrBranch }}' + --remote-url '$(vmrPublicUrl)' + --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' + --verbose + displayName: Push changes to dotnet/dotnet (public) + workingDirectory: $(Agent.BuildDirectory)/installer + + # Push internal/release branches to the internal VMR + - ${{ if startsWith(parameters.vmrBranch, 'internal/release/') }}: + - script: > + ./.dotnet/dotnet darc vmr push + --vmr '$(vmrPath)' + --skip-commit-verification + --branch '${{ parameters.vmrBranch }}' + --remote-url '$(vmrInternalUrl)' + --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' + --verbose + displayName: Push changes to dotnet-dotnet (internal) + workingDirectory: $(Agent.BuildDirectory)/installer \ No newline at end of file diff --git a/eng/pipelines/vmr-sync-internal.yml b/eng/pipelines/vmr-sync-internal.yml new file mode 100644 index 000000000..01b19525c --- /dev/null +++ b/eng/pipelines/vmr-sync-internal.yml @@ -0,0 +1,33 @@ +pr: none + +trigger: + batch: true + branches: + include: + - internal/release/* + +resources: + repositories: + - repository: vmr + type: git + name: dotnet-dotnet + ref: $(Build.SourceBranch) + +parameters: +- name: vmrBranch + displayName: dotnet-dotnet branch to push to + type: string + default: ' ' + +variables: +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ parameters.vmrBranch }} +- ${{ else }}: + - name: VmrBranch + value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} + +jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} \ No newline at end of file diff --git a/eng/pipelines/vmr-sync.yml b/eng/pipelines/vmr-sync.yml index 79f49fe22..70e47d257 100644 --- a/eng/pipelines/vmr-sync.yml +++ b/eng/pipelines/vmr-sync.yml @@ -13,6 +13,7 @@ resources: type: github name: dotnet/dotnet endpoint: dotnet + ref: $(Build.SourceBranch) parameters: - name: vmrBranch