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

Switch from Testpipeline variable to parameter #11986

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
17 changes: 10 additions & 7 deletions eng/pipelines/templates/stages/archetype-js-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ stages:
deploy:
chidozieononiwu marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -131,6 +132,7 @@ stages:
DocRepoDestinationPath: 'docs-ref-services/'
GHReviewersVariable: 'OwningGHUser'
CIConfigs: $(CIConfigs)
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'

- ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:
- deployment: PublishDocsGitHubIO
Expand Down Expand Up @@ -205,6 +207,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: ${{parameters.DependsOn}}
Expand Down
15 changes: 10 additions & 5 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ parameters:
- name: Artifacts
type: object
default: []
- name: TestPipeline
type: boolean
default: false
- name: ServiceDirectory
type: string
default: not-specified
Expand All @@ -23,17 +26,19 @@ stages:
jobs:
- template: ../jobs/archetype-sdk-client.yml
parameters:
ServiceDirectory: ${{parameters.ServiceDirectory}}
Artifacts: ${{parameters.Artifacts}}
RunUnitTests: ${{parameters.RunUnitTests}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
TestPipeline: ${{ parameters.TestPipeline }}
RunUnitTests: ${{ parameters.RunUnitTests }}

# 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'), eq(parameters.IncludeRelease,true))}}:
- template: archetype-js-release.yml
parameters:
DependsOn: Build
ServiceDirectory: ${{parameters.ServiceDirectory}}
Artifacts: ${{parameters.Artifacts}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactName: packages
TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }}
TargetDocRepoName: ${{ parameters.TargetDocRepoName }}
15 changes: 8 additions & 7 deletions eng/pipelines/templates/steps/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ parameters:
ServiceDirectory: not-specified

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: |
$folder = "${{parameters.ServiceDirectory}}"
Expand Down
2 changes: 1 addition & 1 deletion sdk/template/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ trigger:
paths:
include:
- sdk/template/
- eng/common/

pr:
branches:
Expand All @@ -26,6 +25,7 @@ extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: template
TestPipeline: true
Artifacts:
- name: azure-template
safeName: azuretemplate