Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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/stages/archetype-net-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ parameters:
DevOpsFeedId: '29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f'
TargetDocRepoOwner: 'not-specified'
TargetDocRepoName: 'not-specified'
Environment: nuget
stages:
- stage: Signing
dependsOn: ${{parameters.DependsOn}}
jobs:
- deployment: SignPackage
environment: esrp
environment: ${{parameters.Environment}}
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
Expand Down Expand Up @@ -49,7 +50,7 @@ stages:
- deployment: TagRepository
displayName: "Create release tag"
condition: ne(variables['Skip.TagRepository'], 'true')
environment: github
environment: ${{parameters.Environment}}

pool:
name: azsdk-pool-mms-win-2022-general
Expand Down Expand Up @@ -96,7 +97,7 @@ stages:
- deployment: PublishPackage
displayName: Publish package to Nuget.org and DevOps Feed
condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true'))
environment: nuget
environment: ${{parameters.Environment}}
dependsOn: TagRepository

pool:
Expand Down Expand Up @@ -126,7 +127,7 @@ stages:
- deployment: UploadSymbols
displayName: Upload Symbols to Symbols Server
condition: and(succeeded(), ne(variables['Skip.SymbolsUpload'], 'true'))
environment: nuget
environment: ${{parameters.Environment}}
dependsOn: PublishPackage

pool:
Expand All @@ -153,7 +154,7 @@ stages:
- deployment: PublicDocsMS
displayName: Publish to Docs.MS
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
environment: githubio
environment: ${{parameters.Environment}}
dependsOn: PublishPackage

pool:
Expand Down Expand Up @@ -186,7 +187,7 @@ stages:
- deployment: PublishDocs
displayName: Publish Docs to GitHub pages
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
environment: githubio
environment: ${{parameters.Environment}}
dependsOn: PublishPackage

pool:
Expand All @@ -212,7 +213,7 @@ stages:
- deployment: UpdatePackageVersion
displayName: "Update Package Version"
condition: and(succeeded(), ne(variables['Skip.UpdatePackageVersion'], 'true'))
environment: github
environment: ${{parameters.Environment}}
dependsOn: PublishPackage

pool:
Expand Down
21 changes: 20 additions & 1 deletion eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ parameters:
- name: LimitForPullRequest
type: boolean
default: false
- name: RunDefaultLiveTestStages
type: boolean
default: false
- name: LiveTestStages
type: stageList
default: []
- name: ReleaseDependsOnLiveTests
type: string
default: not-specified

variables:
- template: ../variables/globals.yml
Expand Down Expand Up @@ -92,14 +101,24 @@ stages:

# 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'))}}:
- ${{ parameters.LiveTestStages }}

- template: archetype-net-release.yml
parameters:
SDKType: ${{ parameters.SDKType }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
DependsOn: Build
DependsOn:
- Build
# Only depend on live test stages if the build depends on live tests and the build reason is manual.
# This prevents check-in builds and scheduled builds from having a requirement on live test stages.
- ${{ if eq(parameters.ReleaseDependsOnLiveTests, 'true') }}:
- ${{ each liveTestStage in parameters.LiveTestStages }}:
- ${{ liveTestStage.stage }}
Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
ArtifactName: packages
TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }}
TargetDocRepoName: ${{ parameters.TargetDocRepoName }}
${{ if eq(parameters.ReleaseDependsOnLiveTests, 'false') }}:
Environment: 'nuget-break-glass-approvers'
5 changes: 2 additions & 3 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ parameters:
pathToPublish: '$(Build.ArtifactStagingDirectory)/SessionRecords'
artifactName: SessionRecords

variables:
- template: ../variables/globals.yml

stages:
- ${{ each cloud in parameters.CloudConfig }}:
- ${{ if or(contains(parameters.Clouds, cloud.key), and(contains(variables['Build.DefinitionName'], 'tests-weekly'), contains(parameters.SupportedClouds, cloud.key))) }}:
- ${{ if not(contains(parameters.UnsupportedClouds, cloud.key)) }}:
- stage: ${{ cloud.key }}
dependsOn: []
variables:
- template: ../variables/globals.yml
jobs:
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
parameters:
Expand Down
11 changes: 11 additions & 0 deletions sdk/template/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ pr:
- eng/common/
#endif

parameters:
- name: AllowFailingLiveTests
displayName: Allow release with failing live tests
type: boolean
default: false

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
Expand All @@ -41,3 +47,8 @@ extends:
Artifacts:
- name: Azure.Template
safeName: AzureTemplate
ReleaseDependsOnLiveTests: ${{ not(parameters.AllowFailingLiveTests) }}
LiveTestStages:
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: template