Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent eng/common PR trigger for template pipeline, close test PRs #16145

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ jobs:
pool:
vmImage: windows-2019
steps:
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: and(succeeded(),eq(variables['TestPipeline'],'true'))
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1
- ${{if eq(parameters.TestPipeline, 'true')}}:
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: succeeded()
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1
- pwsh: |
echo "##vso[build.addbuildtag]Scheduled"
displayName: "Tag scheduled builds"
Expand Down
17 changes: 10 additions & 7 deletions eng/pipelines/templates/stages/archetype-net-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ stages:
deploy:
steps:
- checkout: self
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: and(succeeded(),eq(variables['TestPipeline'],'true'))
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1
- ${{if eq(parameters.TestPipeline, 'true')}}:
- task: PowerShell@2
displayName: Prep template pipeline for release
condition: succeeded()
inputs:
pwsh: true
workingDirectory: $(Build.SourcesDirectory)
filePath: eng/scripts/SetTestPipelineVersion.ps1
- template: /eng/common/pipelines/templates/steps/verify-changelog.yml
parameters:
PackageName: ${{artifact.name}}
Expand Down Expand Up @@ -166,6 +167,7 @@ stages:
GHReviewersVariable: 'OwningGHUser'
CIConfigs: $(CIConfigs)
OnboardingBranch: 'onboarding'
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'

- ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:
- deployment: PublishDocs
Expand Down Expand Up @@ -216,6 +218,7 @@ stages:
PRBranchName: increment-package-version-${{ parameters.ServiceDirectory }}-$(Build.BuildId)
CommitMsg: "Increment package version after release of ${{ artifact.name }}"
PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases"
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'

- stage: Integration
dependsOn: Signing
Expand Down
16 changes: 9 additions & 7 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ stages:
- template: ../jobs/archetype-sdk-client.yml
parameters:
ServiceToTest: ${{ coalesce(parameters.ServiceToTest, parameters.ServiceDirectory) }}
ServiceDirectory: ${{parameters.ServiceDirectory}}
Artifacts: ${{parameters.Artifacts}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactName: packages
TestSetupSteps: ${{parameters.TestSetupSteps}}
TestSetupSteps: ${{ parameters.TestSetupSteps }}

# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- template: archetype-net-release.yml
parameters:
ServiceDirectory: ${{parameters.ServiceDirectory}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
DependsOn: Build
Artifacts: ${{parameters.Artifacts}}
Artifacts: ${{ parameters.Artifacts }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactName: packages
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }}
TargetDocRepoName: ${{ parameters.TargetDocRepoName }}
2 changes: 1 addition & 1 deletion sdk/template/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ pr:
paths:
include:
- sdk/template/
- eng/common/

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: template
ArtifactName: packages
TestPipeline: true
Artifacts:
- name: Azure.Template
safeName: AzureTemplate