-
Notifications
You must be signed in to change notification settings - Fork 416
Expand file tree
/
Copy pathrc.yml
More file actions
119 lines (119 loc) · 4.96 KB
/
rc.yml
File metadata and controls
119 lines (119 loc) · 4.96 KB
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
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: Codeql.Enabled
value: true
resources:
pipelines:
- pipeline: microsoft.java-debug.signjars.rc
source: microsoft.java-debug.signjars.rc
trigger:
branches:
include:
- main
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
trigger: none
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: MSEngSS-MicroBuild2022-1ES
stages:
- stage: Build
jobs:
- job: Job_1
displayName: VSCode-Java-Debug-RC
templateContext:
mb:
signing:
enabled: true
signType: real
zipSources: false
feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
outputs:
- output: pipelineArtifact
artifactName: vsix
targetPath: $(Build.ArtifactStagingDirectory)/vsix
displayName: "Publish Artifact: vsix"
steps:
- checkout: self
fetchTags: true
- task: NodeTool@0
displayName: Use Node 20.x
inputs:
versionSpec: 20.x
- task: DownloadBuildArtifacts@1
displayName: Download Build Artifacts
inputs:
buildType: specific
project: a4d27ce2-a42d-4b71-8eef-78cee9a9728e
definition: "16486"
specificBuildWithTriggering: true
downloadType: specific
itemPattern: m2/com.microsoft.java.debug.plugin/com.microsoft.java.debug.plugin-*.jar
extractTars: false
- task: CopyFiles@2
displayName: 'cp plugin.jar to server'
inputs:
SourceFolder: '$(System.ArtifactsDirectory)/m2/com.microsoft.java.debug.plugin'
Contents: |
com.microsoft.java.debug.plugin-*.jar
TargetFolder: $(Build.SourcesDirectory)/server
- task: CmdLine@2
displayName: Delete sources.jar and javadoc.jar from server
inputs:
script: |
del server\com.microsoft.java.debug.plugin-*-sources.jar
del server\com.microsoft.java.debug.plugin-*-javadoc.jar
- task: Npm@1
displayName: npm install
inputs:
verbose: false
- task: CmdLine@2
displayName: Replace AI key
inputs:
script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
- task: CmdLine@2
displayName: vsce package
inputs:
script: npx @vscode/vsce@latest package -o extension.vsix
### Copy files for APIScan
- task: CopyFiles@2
displayName: "Copy Files for APIScan"
inputs:
Contents: "*.vsix"
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
softwareName: "vscode-java-debug"
softwareVersionNum: "$(Build.BuildId)"
isLargeApp: false
toolVersion: "Latest"
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
- script: npx @vscode/vsce@latest generate-manifest -i extension.vsix -o extension.manifest
displayName: 'Generate extension manifest'
- script: copy extension.manifest extension.signature.p7s
displayName: 'Prepare manifest for signing'
- task: CmdLine@2
displayName: Sign extension
inputs:
script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
- task: CopyFiles@2
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
inputs:
Contents: |
extension.vsix
extension.manifest
extension.signature.p7s
TargetFolder: $(Build.ArtifactStagingDirectory)/vsix