1- # empty yaml for testing insertion pipeline
1+ trigger : none # We only want to trigger manually or based on resources
2+ pr : none
3+
4+ resources :
5+ repositories :
6+ - repository : MicroBuildTemplate
7+ type : git
8+ name : 1ESPipelineTemplates/MicroBuildTemplate
9+ ref : refs/tags/release
10+ pipelines :
11+ - pipeline : projectSystemBuild
12+ source : NTVS main - nodejstools
13+ tags :
14+ - Real signed
15+ trigger : none
16+
17+ variables :
18+ ContainsVsix : true
19+
20+ extends :
21+ template : azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
22+ parameters :
23+ sdl :
24+ sourceAnalysisPool : VSEngSS-MicroBuild2022-1ES
25+ stages :
26+ - stage : insertion
27+ jobs :
28+ - job : insertion
29+ displayName : VS insertion
30+ pool : VSEngSS-MicroBuild2022-1ES
31+ templateContext :
32+ outputParentDirectory : $(Pipeline.Workspace)
33+ sdl :
34+ binskim :
35+ analyzeTargetGlob : +:f|$(Pipeline.Workspace)/**;
36+ steps :
37+ - checkout : self
38+ - download : projectSystemBuild
39+ artifact : Variables-Windows
40+ displayName : 🔻 Download Variables-Windows artifact
41+ - powershell : $(Pipeline.Workspace)/projectSystemBuild/Variables-Windows/_define.ps1
42+ displayName : ⚙ Set pipeline variables based on artifacts
43+ - powershell : Write-Host "##vso[build.updatebuildnumber]$(Build.BuildNumber)"
44+ displayName : ⚙️ Set pipeline name
45+ - template : /azure-pipelines/release-deployment-prep.yml@self
46+ - powershell : |
47+ $testsDropName = '$(VstsDropNames)' -replace 'Products', 'Tests'
48+ Write-Host "##vso[task.setvariable variable=TESTSDROPNAME]$testsDropName"
49+ displayName: ⚙ Set test drop name
50+ - download : projectSystemBuild
51+ artifact : vsix
52+ displayName : 🔻 Download vsix artifact
53+ - ${{ if eq(variables['ContainsVsix'], 'true') }} :
54+ - task : 1ES.MicroBuildVstsDrop@1
55+ displayName : 🔺 Upload VSTS Drop
56+ inputs :
57+ dropFolder : $(Pipeline.Workspace)/projectSystemBuild/vsix
58+ dropName : $(VstsDropNames)
59+ accessToken : $(System.AccessToken)
60+ skipUploadIfExists : true
61+ - task : MicroBuildInsertVsPayload@5
62+ displayName : 🏭 Insert VS Payload
63+ inputs :
64+ TeamName : Node Tools for Visual Studio
65+ 66+ InsertionPayloadName : Node Tools for Visual Studio build
67+ InsertionReviewers : ' $(Build.RequestedFor);JSTSteam;JSTS CTI'
68+ CustomScriptExecutionCommand : ' $(Build.SourcesDirectory)/tools/empty-powershell.ps1' # This is intentionally an empty powershell run because MicroBuild needs a CustomScriptExecutionCommand but we don't actually need it
69+ AutoCompletePR : true
70+ AutoCompleteMergeStrategy : Squash
71+ ShallowClone : true
72+ InsertAutoComplete : true
73+ - download : projectSystemBuild
74+ artifact : symbolsToArchive
75+ displayName : 🔻 Download symbolsToArchive artifact
76+ - task : MicroBuildArchiveSymbols@6
77+ displayName : 🔣 Archive symbols to Symweb
78+ inputs :
79+ TeamName : Node Tools for Visual Studio
80+ azureSubscription : ' VSEng-SymbolsUpload' # SERVICE CONNECTION
81+ SymbolsFeatureName : NTVS
82+ SymbolsProject : VS
83+ SymbolsAgentPath : $(Pipeline.Workspace)/projectSystemBuild/symbolsToArchive # $(System.DefaultWorkingDirectory)\NTVS v3\Symbols link: https://dev.azure.com/devdiv/DevDiv/_releaseDefinition?definitionId=300&_a=definition-variables
84+ env :
85+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
86+
87+ - powershell : |
88+ $contentType = 'application/json';
89+ $headers = @{ Authorization = 'Bearer $(System.AccessToken)' };
90+ $rawRequest = @{ daysValid = 365 * 2; definitionId = $(System.DefinitionId); ownerId = 'User:$(Build.RequestedForId)'; protectPipeline = $false; runId = $(Build.BuildId) };
91+ $request = ConvertTo-Json @($rawRequest);
92+ Write-Host $request
93+ $uri = "$(System.CollectionUri)$(System.TeamProject)/_apis/build/retention/leases?api-version=6.0-preview.1";
94+ Invoke-RestMethod -uri $uri -method POST -Headers $headers -ContentType $contentType -Body $request;
95+ displayName: 🗻 Retain inserted builds
0 commit comments