From b72b188792157c4141aa2279f82efa4914cb57b1 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Fri, 23 Apr 2021 09:54:20 +1000 Subject: [PATCH 1/3] Update prepare pipelines template. --- .../templates/steps/prepare-pipelines.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/common/pipelines/templates/steps/prepare-pipelines.yml b/eng/common/pipelines/templates/steps/prepare-pipelines.yml index a4b300dcaba4..cdc1d367e89c 100644 --- a/eng/common/pipelines/templates/steps/prepare-pipelines.yml +++ b/eng/common/pipelines/templates/steps/prepare-pipelines.yml @@ -2,6 +2,9 @@ parameters: - name: Repository type: string default: $(Build.Repository.Name) + - name: Branch + type: string + default: main - name: Prefix type: string - name: CIConventionOptions @@ -30,7 +33,7 @@ steps: --repository ${{parameters.Repository}} --convention ci --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug ${{parameters.CIConventionOptions}} @@ -48,7 +51,7 @@ steps: --repository ${{parameters.Repository}} --convention up --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug ${{parameters.UPConventionOptions}} @@ -66,7 +69,7 @@ steps: --repository ${{parameters.Repository}} --convention tests --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug ${{parameters.TestsConventionOptions}} @@ -88,7 +91,7 @@ steps: --repository ${{parameters.Repository}} --convention ci --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug --no-schedule @@ -107,7 +110,7 @@ steps: --repository ${{parameters.Repository}} --convention up --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug --no-schedule @@ -126,7 +129,7 @@ steps: --repository ${{parameters.Repository}} --convention tests --agentpool Hosted - --branch refs/heads/master + --branch refs/heads/${{parameters.Branch}} --patvar PATVAR --debug --no-schedule From 6d1a463b38dc480064ca790d19d884ba1243735a Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Tue, 27 Apr 2021 13:16:19 +1000 Subject: [PATCH 2/3] Update prepare-pipelines as well. --- .../templates/steps/prepare-pipelines.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/eng/common/pipelines/templates/steps/prepare-pipelines.yml b/eng/common/pipelines/templates/steps/prepare-pipelines.yml index cdc1d367e89c..3e527e2feb2d 100644 --- a/eng/common/pipelines/templates/steps/prepare-pipelines.yml +++ b/eng/common/pipelines/templates/steps/prepare-pipelines.yml @@ -2,8 +2,6 @@ parameters: - name: Repository type: string default: $(Build.Repository.Name) - - name: Branch - type: string default: main - name: Prefix type: string @@ -19,7 +17,7 @@ parameters: steps: - template: install-pipeline-generation.yml - + - template: /eng/common/pipelines/templates/steps/set-default-branch.yml # This covers our public repos. - ${{ if not(endsWith(parameters.Repository, '-pr'))}}: - script: > @@ -33,7 +31,7 @@ steps: --repository ${{parameters.Repository}} --convention ci --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug ${{parameters.CIConventionOptions}} @@ -51,7 +49,7 @@ steps: --repository ${{parameters.Repository}} --convention up --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug ${{parameters.UPConventionOptions}} @@ -69,7 +67,7 @@ steps: --repository ${{parameters.Repository}} --convention tests --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug ${{parameters.TestsConventionOptions}} @@ -91,7 +89,7 @@ steps: --repository ${{parameters.Repository}} --convention ci --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug --no-schedule @@ -110,7 +108,7 @@ steps: --repository ${{parameters.Repository}} --convention up --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug --no-schedule @@ -129,7 +127,7 @@ steps: --repository ${{parameters.Repository}} --convention tests --agentpool Hosted - --branch refs/heads/${{parameters.Branch}} + --branch refs/heads/$(DefaultBranch) --patvar PATVAR --debug --no-schedule From c1cb4cb3b55890df1d8905954fd58701211c0760 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Tue, 27 Apr 2021 13:25:49 +1000 Subject: [PATCH 3/3] Remove default line. --- eng/common/pipelines/templates/steps/prepare-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/prepare-pipelines.yml b/eng/common/pipelines/templates/steps/prepare-pipelines.yml index 3e527e2feb2d..47fc611316d1 100644 --- a/eng/common/pipelines/templates/steps/prepare-pipelines.yml +++ b/eng/common/pipelines/templates/steps/prepare-pipelines.yml @@ -2,7 +2,6 @@ parameters: - name: Repository type: string default: $(Build.Repository.Name) - default: main - name: Prefix type: string - name: CIConventionOptions