1+ name : $(Date:yyyyMMdd).$(Rev:r)
2+ variables :
3+ - name : Codeql.Enabled
4+ value : true
5+ schedules :
6+ - cron : 0 7 * * 1,2,3,4,5
7+ branches :
8+ include :
9+ - refs/heads/main
10+ resources :
11+ pipelines :
12+ - pipeline : microsoft.java-debug.signjars.nightly
13+ source : microsoft.java-debug.signjars.nightly
14+ trigger :
15+ branches :
16+ include :
17+ - refs/heads/main
18+ repositories :
19+ - repository : self
20+ type : git
21+ ref : refs/heads/main
22+ - repository : CustomPipelineTemplates
23+ type : git
24+ name : 1ESPipelineTemplates/MicroBuildTemplate
25+ ref : refs/tags/release
26+ trigger : none
27+ extends :
28+ template : azure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates
29+ parameters :
30+ pool :
31+ name : VSEng-MicroBuildVSStable
32+ stages :
33+ - stage : Build
34+ jobs :
35+ - job : Job_1
36+ displayName : VSCode-Java-Debug-Nightly
37+ templateContext :
38+ mb :
39+ signing :
40+ enabled : true
41+ signType : real
42+ signWithProd : true
43+ zipSources : false
44+ feedSource : ' https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
45+ outputs :
46+ - output : pipelineArtifact
47+ artifactName : vsix
48+ targetPath : $(Build.ArtifactStagingDirectory)/vsix
49+ displayName : " Publish Artifact: vsix"
50+ steps :
51+ - checkout : self
52+ fetchTags : false
53+ - task : NodeTool@0
54+ displayName : Use Node 20.x
55+ inputs :
56+ versionSpec : 20.x
57+ - task : DownloadBuildArtifacts@1
58+ displayName : Download Build Artifacts
59+ inputs :
60+ buildType : specific
61+ project : a4d27ce2-a42d-4b71-8eef-78cee9a9728e
62+ definition : " 16485"
63+ specificBuildWithTriggering : true
64+ downloadType : specific
65+ itemPattern : plugin/jars/com.microsoft.java.debug.plugin-*.jar
66+ extractTars : false
67+ - task : CopyFiles@2
68+ displayName : ' cp plugin.jar to server'
69+ inputs :
70+ SourceFolder : ' $(System.ArtifactsDirectory)/plugin/jars'
71+ Contents : ' com.microsoft.java.debug.plugin-*.jar'
72+ TargetFolder : $(Build.SourcesDirectory)/server
73+ - task : Npm@1
74+ displayName : npm install
75+ inputs :
76+ verbose : false
77+ - task : CmdLine@2
78+ displayName : Update nightly vsix version
79+ inputs :
80+ script : node scripts/build/prepare-nightly-build.js
81+ - task : CmdLine@2
82+ displayName : Replace AI key
83+ inputs :
84+ script : npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
85+ - task : CmdLine@2
86+ displayName : vsce package --pre-release -o extension.vsix
87+ inputs :
88+ script : npx @vscode/vsce@latest package --pre-release -o extension.vsix
89+ # ## Copy files for APIScan
90+ - task : CopyFiles@2
91+ displayName : " Copy Files for APIScan"
92+ inputs :
93+ Contents : " *.vsix"
94+ TargetFolder : $(Agent.TempDirectory)/APIScanFiles
95+ condition : and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
96+ # ## Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
97+ - task : APIScan@2
98+ displayName : Run APIScan
99+ inputs :
100+ softwareFolder : $(Agent.TempDirectory)/APIScanFiles
101+ softwareName : " vscode-java-debug"
102+ softwareVersionNum : " $(Build.BuildId)"
103+ isLargeApp : false
104+ toolVersion : " Latest"
105+ condition : and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
106+ env :
107+ AzureServicesAuthConnectionString : runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
108+ - script : npx @vscode/vsce@latest generate-manifest -i extension.vsix -o extension.manifest
109+ displayName : ' Generate extension manifest'
110+ - script : copy extension.manifest extension.signature.p7s
111+ displayName : ' Prepare manifest for signing'
112+ - task : CmdLine@2
113+ displayName : Sign extension
114+ inputs :
115+ script : dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
116+ env :
117+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
118+ - task : CopyFiles@2
119+ displayName : " Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
120+ inputs :
121+ Contents : |
122+ extension.vsix
123+ extension.manifest
124+ extension.signature.p7s
125+ TargetFolder : $(Build.ArtifactStagingDirectory)/vsix
0 commit comments