-
Notifications
You must be signed in to change notification settings - Fork 675
/
Copy pathazure-pipelines-release.yml
127 lines (107 loc) · 5.06 KB
/
azure-pipelines-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# This pipeline is used to release PTVS to Visual Studio via an insertion PR.
# The pipeline extends v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates from 1esPipelines repository defined in resources section.
parameters:
# The Visual Studio branch we are inserting into.
# This will almost always be main, but can be changed to a release branch if needed.
- name: VisualStudioBranch
displayName: Visual Studio Branch
type: string
default: main
- name: PublishNugetPackage
displayName: Publish Nuget Package
type: boolean
default: false
# build number format
name: $(date:yy)$(DayOfYear)$(rev:.r)
# disable CI and PR triggers
trigger: none
pr: none
variables:
- name: VisualStudioBranch
value: ${{ parameters.VisualStudioBranch }}
- name: PublishNugetPackage
value: ${{ parameters.PublishNugetPackage }}
# https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=381&path=PTVS-Dev17
- group: PTVS-Dev17
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
# Add the PTVS-Build pipeline as a resource
pipelines:
- pipeline: PTVS-Build
source: PTVS-Build
# When run manually, only consume builds with all of the following tags
tags:
- Real signed
- Pylance Stable
# Trigger this pipeline when the PTVS-Build pipeline completes.
trigger:
# Only trigger on builds from main. Builds from release are manually triggered.
branches:
- main
# Only trigger on builds with all of the following tags
tags:
- Real signed
- Pylance Stable
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
stages:
- stage: Release
jobs:
- job: Release
condition: eq(variables['PublishNugetPackage'], 'false')
steps:
# we don't need to checkout any source code
- checkout: none
# tag the release pipeline with the PTVS-Build build number that produced the artifacts that will be released
- script: |
echo ##vso[build.addbuildtag]PTVS-Build $(resources.pipeline.PTVS-Build.runName)
displayName: 'Add PTVS-Build tag'
# Insert the payload uploaded by the PTVS-Build pipeline into Visual Studio.
# We don't need to download pipeline artifacts here, because the payload is uploaded to a drop location.
# For more info, see https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_wiki/wikis/DevDiv.wiki/629/Automated-VS-Insertion.
- task: ms-vseng.MicroBuildShipTasks.55100717-a81d-45ea-a363-b8fe3ec375ad.MicroBuildInsertVsPayload@4
displayName: 'Create Insertion PR'
inputs:
TargetBranch: $(VisualStudioBranch)
InsertionTopicBranch: 'dev/ptvs/insertions/$(VisualStudioBranch)-$(Build.SourceBranchName)-$(resources.pipeline.PTVS-Build.runName)'
TeamName: PTVS
TeamEmail: '[email protected]'
ComponentJsonValues: 'Microsoft.PythonTools.vsman=https://vsdrop.corp.microsoft.com/file/v1/Products/DevDiv/microsoft/PTVS/$(Build.SourceBranchName)/$(resources.pipeline.PTVS-Build.runName);Microsoft.PythonTools.vsman'
InsertionPayloadName: 'ptvs $(Build.SourceBranchName) $(resources.pipeline.PTVS-Build.runName)'
InsertionReviewers: '[email protected],[email protected],[email protected],[email protected],[email protected]'
InsertionBuildPolicy: 'Request Perf DDRITs'
AutoCompletePR: true
AutoCompleteMergeStrategy: Squash
AddCommitsToPR: false
LinkWorkItemsToPR: false
# See https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages?tabs=outputsyntax
- job: Publish
displayName: Publish Profiler Nuget Package
condition: eq(variables['PublishNugetPackage'], 'true')
templateContext:
inputs:
- input: pipelineArtifact
pipeline: PTVS-Build
artifactName: pkg
targetPath: $(System.ArtifactsDirectory)/pkg
outputs:
- output: nuget
useDotNetTask: false # The default is false to use the NuGetCommand task. Set to true to use the DotNetCoreCLI task to publish packages.
packagesToPush: '$(System.ArtifactsDirectory)\pkg\*.nupkg'
packageParentPath: '$(System.ArtifactsDirectory)'
nuGetFeedType: internal
allowPackageConflicts: true # Optional. NuGetCommand task only.
publishPackageMetadata: true # Optional. NuGetCommand task only.
publishVstsFeed: vs-impl
steps:
# Remove the _manifest folder (sbom) from the pkg artifact, since we don't want to publish it.
- script: rd /s /q $(System.ArtifactsDirectory)\pkg\_manifest
displayName: Remove _manifest folder