From 439d38946c7f9098332f21581e0969cc709c0e90 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Thu, 2 Feb 2023 15:01:28 +0100 Subject: [PATCH 01/16] add refs to resources --- .vsts-ci.yml | 15 +++++++++++++++ eng/pipelines/vmr-sync.yml | 1 + 2 files changed, 16 insertions(+) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 7e5ca7836..ca4e2494d 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -37,6 +37,21 @@ variables: /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) +- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - name: VmrRef + value: $(System.PullRequest.TargetBranch) +- ${{ else }}: + - name: VmrRef + value: 'refs/heads/main' + +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + ref: $(VmrRef) + stages: - stage: Build jobs: 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 From 2f34945ee1fdc70634d29303bb1cbe8223b04b4b Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Thu, 2 Feb 2023 15:03:02 +0100 Subject: [PATCH 02/16] use push command --- .../templates/jobs/vmr-synchronization.yml | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 8c7767ac7..34e175e3a 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -25,12 +25,12 @@ 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 + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/dev/'))) }}: + - group: DotNetBot-AzDO-PAT + pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) @@ -52,16 +52,20 @@ jobs: targetRef: ${{ parameters.targetRef }} # For official builds, push the changes to the VMR - # Push only main and release branches + # Push main and release branches to the public vmr - ${{ 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 }} + ./.dotnet/dotnet darc vmr push --vmr $(vmrPath) --commit-verification-pat $(BotAccount-dotnet-maestro-bot-no-scopes-PAT) --branch ${{ parameters.vmrBranch }} --remote-url https://github.com/dotnet/dotnet.git --github-pat $(BotAccount-dotnet-bot-repo-PAT) displayName: Push changes to dotnet/dotnet - workingDirectory: $(vmrPath) + workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) + + # Push internal/release branches to the internal vmr + - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: + - script: | + set -x + ./.dotnet/dotnet darc vmr push --vmr $(vmrPath) --skip-commit-verification --branch ${{ parameters.vmrBranch }} --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat $(dn-bot-dnceng-build-rw-code-rw) + displayName: Push changes to dotnet/dotnet + workingDirectory: $(vmrPath)/src/installer + condition: and(succeeded(), or(startsWith(variables['vmrBranch'], 'internal/release/'), startsWith(variables['vmrBranch'], 'dev/')) \ No newline at end of file From 1f25df5d5dfc6dd3ef74d2633e0559baa13cc6b1 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Thu, 2 Feb 2023 15:10:10 +0100 Subject: [PATCH 03/16] create yml for internal sync --- eng/pipelines/vmr-internal-sync.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 eng/pipelines/vmr-internal-sync.yml diff --git a/eng/pipelines/vmr-internal-sync.yml b/eng/pipelines/vmr-internal-sync.yml new file mode 100644 index 000000000..93712bd45 --- /dev/null +++ b/eng/pipelines/vmr-internal-sync.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: /eng/pipelines/templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} \ No newline at end of file From a02ad9fe6c6dc95b1029d55e73cbeb35ddfdedc9 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Thu, 2 Feb 2023 15:22:03 +0100 Subject: [PATCH 04/16] check for public pr --- .vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index ca4e2494d..8109bf0ef 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -37,7 +37,7 @@ variables: /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) -- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: +- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - name: VmrRef value: $(System.PullRequest.TargetBranch) - ${{ else }}: From eb62f87cb44e9b7ae25faca10c0441599a91566a Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Fri, 3 Feb 2023 15:24:12 +0100 Subject: [PATCH 05/16] remote test branches --- .vsts-ci.yml | 2 +- eng/pipelines/templates/jobs/vmr-synchronization.yml | 12 ++++++------ eng/pipelines/vmr-internal-sync.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 8109bf0ef..1dec09fc5 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -42,7 +42,7 @@ variables: value: $(System.PullRequest.TargetBranch) - ${{ else }}: - name: VmrRef - value: 'refs/heads/main' + value: refs/heads/main resources: repositories: diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 34e175e3a..fe28bb27e 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -28,7 +28,7 @@ jobs: - ${{ 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 - group: DotNetBot-GitHub-No-Scopes - - ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/dev/'))) }}: + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}: - group: DotNetBot-AzDO-PAT pool: @@ -52,20 +52,20 @@ jobs: targetRef: ${{ parameters.targetRef }} # For official builds, push the changes to the VMR - # Push main and release branches to the public vmr + # Push main and release branches to the public VMR - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr $(vmrPath) --commit-verification-pat $(BotAccount-dotnet-maestro-bot-no-scopes-PAT) --branch ${{ parameters.vmrBranch }} --remote-url https://github.com/dotnet/dotnet.git --github-pat $(BotAccount-dotnet-bot-repo-PAT) + ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --commit-verification-pat "$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)" --branch "${{ parameters.vmrBranch }}" --remote-url https://github.com/dotnet/dotnet.git --github-pat "$(BotAccount-dotnet-bot-repo-PAT)" --verbose displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) - # Push internal/release branches to the internal vmr + # Push internal/release branches to the internal VMR - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr $(vmrPath) --skip-commit-verification --branch ${{ parameters.vmrBranch }} --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat $(dn-bot-dnceng-build-rw-code-rw) + ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch "${{ parameters.vmrBranch }}" --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat "$(dn-bot-dnceng-build-rw-code-rw)" --verbose displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath)/src/installer - condition: and(succeeded(), or(startsWith(variables['vmrBranch'], 'internal/release/'), startsWith(variables['vmrBranch'], 'dev/')) \ No newline at end of file + condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file diff --git a/eng/pipelines/vmr-internal-sync.yml b/eng/pipelines/vmr-internal-sync.yml index 93712bd45..920f7edcd 100644 --- a/eng/pipelines/vmr-internal-sync.yml +++ b/eng/pipelines/vmr-internal-sync.yml @@ -17,10 +17,10 @@ parameters: - name: vmrBranch displayName: dotnet-dotnet branch to push to type: string - default: '' + default: ' ' variables: -- ${{ if ne(parameters.vmrBranch, '') }}: +- ${{ if ne(parameters.vmrBranch, ' ') }}: - name: VmrBranch value: ${{ parameters.vmrBranch }} - ${{ else }}: From 65138b64a9f6ce683da320178ff377e499447cfb Mon Sep 17 00:00:00 2001 From: Milena Hristova Date: Fri, 3 Feb 2023 15:41:07 +0100 Subject: [PATCH 06/16] Update eng/pipelines/templates/jobs/vmr-synchronization.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Přemek Vysoký --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index fe28bb27e..af987a742 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -56,7 +56,7 @@ jobs: - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --commit-verification-pat "$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)" --branch "${{ parameters.vmrBranch }}" --remote-url https://github.com/dotnet/dotnet.git --github-pat "$(BotAccount-dotnet-bot-repo-PAT)" --verbose + ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' --branch '${{ parameters.vmrBranch }}' --remote-url https://github.com/dotnet/dotnet --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' --verbose displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) From 726d0a63a4ee515c13b4b44c93ecf65c3df96cda Mon Sep 17 00:00:00 2001 From: Milena Hristova Date: Fri, 3 Feb 2023 15:41:17 +0100 Subject: [PATCH 07/16] Update eng/pipelines/templates/jobs/vmr-synchronization.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Přemek Vysoký --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index af987a742..48aa4d0e2 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -65,7 +65,7 @@ jobs: - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch "${{ parameters.vmrBranch }}" --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat "$(dn-bot-dnceng-build-rw-code-rw)" --verbose + ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch '${{ parameters.vmrBranch }}' --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file From 80654fd3bbd6a789d2e38a8b83bf369f17041d71 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Fri, 3 Feb 2023 16:31:24 +0100 Subject: [PATCH 08/16] rename and display names --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 4 ++-- .../{vmr-internal-sync.yml => vmr-sync-internal.yml} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename eng/pipelines/{vmr-internal-sync.yml => vmr-sync-internal.yml} (100%) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 48aa4d0e2..118668b5a 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -57,7 +57,7 @@ jobs: - script: | set -x ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' --branch '${{ parameters.vmrBranch }}' --remote-url https://github.com/dotnet/dotnet --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' --verbose - displayName: Push changes to dotnet/dotnet + displayName: Push changes to dotnet/dotnet (public) workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) @@ -66,6 +66,6 @@ jobs: - script: | set -x ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch '${{ parameters.vmrBranch }}' --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose - displayName: Push changes to dotnet/dotnet + displayName: Push changes to dotnet-dotnet (internal) workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file diff --git a/eng/pipelines/vmr-internal-sync.yml b/eng/pipelines/vmr-sync-internal.yml similarity index 100% rename from eng/pipelines/vmr-internal-sync.yml rename to eng/pipelines/vmr-sync-internal.yml From 452a5247fa16e430a4c6f0b4adf819d1fc6a147f Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 13:35:25 +0100 Subject: [PATCH 09/16] remove vmr resource --- .vsts-ci.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 1dec09fc5..7e5ca7836 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -37,21 +37,6 @@ variables: /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) -- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - - name: VmrRef - value: $(System.PullRequest.TargetBranch) -- ${{ else }}: - - name: VmrRef - value: refs/heads/main - -resources: - repositories: - - repository: vmr - type: github - name: dotnet/dotnet - endpoint: dotnet - ref: $(VmrRef) - stages: - stage: Build jobs: From 7c3d67e6d55700eb65f19f5b5f7cef4c92ca6669 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 13:39:18 +0100 Subject: [PATCH 10/16] put urls in variables --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 118668b5a..3213488a4 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -30,6 +30,10 @@ jobs: - group: DotNetBot-GitHub-No-Scopes - ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}: - group: DotNetBot-AzDO-PAT + - name: vmrPublicUrl + value: https://github.com/dotnet/dotnet + - name: vmrPrivateUrl + value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: @@ -56,7 +60,7 @@ jobs: - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' --branch '${{ parameters.vmrBranch }}' --remote-url https://github.com/dotnet/dotnet --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' --verbose + ./.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: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) @@ -65,7 +69,7 @@ jobs: - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - script: | set -x - ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch '${{ parameters.vmrBranch }}' --remote-url https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose + ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch '${{ parameters.vmrBranch }}' --remote-url '$(vmrPrivateUrl)' --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose displayName: Push changes to dotnet-dotnet (internal) workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file From 23028c7c6c1cdb5504b0f5d950caf06091542129 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 14:01:20 +0100 Subject: [PATCH 11/16] bump darc --- .config/dotnet-tools.json | 2 +- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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 e7a4227dc..c69780e6e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -210,13 +210,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 3685056b5..662ed8263 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 From 9eb822ccfbd09f846ec19caab2958516a810b9f6 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 14:35:05 +0100 Subject: [PATCH 12/16] scripts --- .../templates/jobs/vmr-synchronization.yml | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 3213488a4..4ea21ac28 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -55,21 +55,30 @@ jobs: vmrBranch: ${{ parameters.vmrBranch }} targetRef: ${{ parameters.targetRef }} - # For official builds, push the changes to the VMR # Push main and release branches to the public VMR - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - - script: | - set -x - ./.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 + - 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: $(vmrPath)/src/installer condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) # Push internal/release branches to the internal VMR - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - - script: | - set -x - ./.dotnet/dotnet darc vmr push --vmr "$(vmrPath)" --skip-commit-verification --branch '${{ parameters.vmrBranch }}' --remote-url '$(vmrPrivateUrl)' --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose + - script: > + ./.dotnet/dotnet darc vmr push + --vmr '$(vmrPath)' + --skip-commit-verification + --branch '${{ parameters.vmrBranch }}' + --remote-url '$(vmrPrivateUrl)' + --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' + --verbose displayName: Push changes to dotnet-dotnet (internal) workingDirectory: $(vmrPath)/src/installer condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file From e46d3fc2dd0d8d972388f182be47436d4e348253 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 15:25:30 +0100 Subject: [PATCH 13/16] scripts --- .../templates/jobs/vmr-synchronization.yml | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 4ea21ac28..76bb3ba86 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -22,19 +22,19 @@ jobs: displayName: Synchronize dotnet/dotnet timeoutInMinutes: 120 variables: - - template: /eng/common/templates/variables/pool-providers.yml + - template: templates/variables/pool-providers.yml - name: vmrPath value: $(Agent.BuildDirectory)/vmr - ${{ 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 - 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: vmrPublicUrl - value: https://github.com/dotnet/dotnet - - name: vmrPrivateUrl - value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet - + - name: vmrInternalUrl + value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet + pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) @@ -55,30 +55,30 @@ jobs: vmrBranch: ${{ parameters.vmrBranch }} targetRef: ${{ parameters.targetRef }} - # Push main and release branches to the public VMR - - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - - 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: $(vmrPath)/src/installer - condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) - # Push internal/release branches to the internal VMR - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: - - script: > - ./.dotnet/dotnet darc vmr push - --vmr '$(vmrPath)' - --skip-commit-verification - --branch '${{ parameters.vmrBranch }}' - --remote-url '$(vmrPrivateUrl)' - --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' - --verbose - displayName: Push changes to dotnet-dotnet (internal) - workingDirectory: $(vmrPath)/src/installer - condition: and(succeeded(), startsWith(variables['vmrBranch'], 'internal/release/')) \ No newline at end of file + # 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: $(vmrPath)/src/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: $(vmrPath)/src/installer \ No newline at end of file From fc81e01bb2e7ed576f292e1318e17291f57889c4 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 15:33:41 +0100 Subject: [PATCH 14/16] fix --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 76bb3ba86..f80a9edd6 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -22,7 +22,7 @@ jobs: displayName: Synchronize dotnet/dotnet timeoutInMinutes: 120 variables: - - template: templates/variables/pool-providers.yml + - template: /eng/common/templates/variables/pool-providers.yml - name: vmrPath value: $(Agent.BuildDirectory)/vmr - ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: From 88daeae33b7d7b43c90ba929e3bf90624895ccbb Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 16:05:01 +0100 Subject: [PATCH 15/16] fix scripts --- eng/pipelines/templates/jobs/vmr-synchronization.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index f80a9edd6..0992b9d08 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -68,7 +68,7 @@ jobs: --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' --verbose displayName: Push changes to dotnet/dotnet (public) - workingDirectory: $(vmrPath)/src/installer + workingDirectory: $(Agent.BuildDirectory)/installer # Push internal/release branches to the internal VMR - ${{ if startsWith(parameters.vmrBranch, 'internal/release/') }}: @@ -81,4 +81,4 @@ jobs: --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' --verbose displayName: Push changes to dotnet-dotnet (internal) - workingDirectory: $(vmrPath)/src/installer \ No newline at end of file + workingDirectory: $(Agent.BuildDirectory)/installer \ No newline at end of file From 2208267af62a546599b796f58f2e27006912fc12 Mon Sep 17 00:00:00 2001 From: MilenaHristova Date: Tue, 7 Feb 2023 16:07:18 +0100 Subject: [PATCH 16/16] template path --- eng/pipelines/vmr-sync-internal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/vmr-sync-internal.yml b/eng/pipelines/vmr-sync-internal.yml index 920f7edcd..01b19525c 100644 --- a/eng/pipelines/vmr-sync-internal.yml +++ b/eng/pipelines/vmr-sync-internal.yml @@ -28,6 +28,6 @@ variables: value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} jobs: - - template: /eng/pipelines/templates/jobs/vmr-synchronization.yml + - template: templates/jobs/vmr-synchronization.yml parameters: vmrBranch: ${{ variables.VmrBranch }} \ No newline at end of file