Skip to content

Commit

Permalink
Prevent eng/common PR trigger for template pipeline, close test PRs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Oct 22, 2020
1 parent 473fa11 commit bb8b91f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
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

0 comments on commit bb8b91f

Please sign in to comment.