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 TestPipeline from variable to parameter #16657

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
16 changes: 9 additions & 7 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
SDKType: client
ServiceDirectory: not-specified # Set a default that breaks in obvious ways.
TestPipeline: false
Artifacts: []
AdditionalModules: []
PreTestSteps: []
Expand Down Expand Up @@ -53,13 +54,14 @@ jobs:
ArtifactName: 'packages'

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

- script: |
echo "##vso[build.addbuildtag]Scheduled"
Expand Down
17 changes: 10 additions & 7 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
Artifacts: []
TestPipeline: false
ArtifactName: 'not-specified'
TargetDocRepoOwner: ''
TargetDocRepoName: ''
Expand Down Expand Up @@ -61,13 +62,14 @@ stages:
vmImage: ubuntu-18.04

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

- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand Down Expand Up @@ -185,6 +187,7 @@ stages:
DocRepoDestinationPath: 'docs-ref-services/'
GHReviewersVariable: 'OwningGHUser'
CIConfigs: $(CIConfigs)
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'

- ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:
- deployment: PublishDocs
Expand Down
21 changes: 13 additions & 8 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ parameters:
- name: Artifacts
type: object
default: []
- name: TestPipeline
type: boolean
default: false
- name: AdditionalModules
type: object
default: []
Expand All @@ -30,20 +33,22 @@ stages:
jobs:
- template: ../jobs/archetype-sdk-client.yml
parameters:
ServiceDirectory: ${{parameters.ServiceDirectory}}
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestPipeline: ${{ parameters.TestPipeline }}
SDKType: ${{ parameters.SDKType }}
Artifacts: ${{ parameters.Artifacts }}
AdditionalModules: ${{ parameters.AdditionalModules }}

# 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-java-release.yml
parameters:
DependsOn: Build
ServiceDirectory: ${{parameters.ServiceDirectory}}
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
SDKType: ${{ parameters.SDKType }}
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 @@ -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-sdk-template
groupId: com.azure
Expand Down