Skip to content

Commit ea35d3e

Browse files
committed
Merge branch 'main' into pr/530
2 parents 6974d82 + 9758e1d commit ea35d3e

237 files changed

Lines changed: 16830 additions & 15594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azure-pipelines/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: $(Date:yyyyMMdd).$(Rev:r)
2+
variables:
3+
- name: Codeql.Enabled
4+
value: true
5+
resources:
6+
repositories:
7+
- repository: self
8+
type: git
9+
ref: refs/heads/main
10+
- repository: 1esPipelines
11+
type: git
12+
name: 1ESPipelineTemplates/1ESPipelineTemplates
13+
ref: refs/tags/release
14+
trigger:
15+
branches:
16+
include:
17+
- main
18+
extends:
19+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
20+
parameters:
21+
pool:
22+
os: linux
23+
name: 1ES_JavaTooling_Pool
24+
image: 1ES_JavaTooling_Ubuntu-2004
25+
sdl:
26+
sourceAnalysisPool:
27+
name: 1ES_JavaTooling_Pool
28+
image: 1ES_JavaTooling_Windows_2022
29+
os: windows
30+
customBuildTags:
31+
- MigrationTooling-mseng-VSJava-9181-Tool
32+
stages:
33+
- stage: Build
34+
jobs:
35+
- job: Job_1
36+
displayName: VSCode-Java-Debug-CI
37+
templateContext:
38+
outputs:
39+
- output: pipelineArtifact
40+
artifactName: vsix
41+
targetPath: $(Build.ArtifactStagingDirectory)/vsix
42+
displayName: "Publish Artifact: vsix"
43+
steps:
44+
- checkout: self
45+
fetchTags: true
46+
- task: JavaToolInstaller@0
47+
displayName: Use Java 21
48+
inputs:
49+
versionSpec: "21"
50+
jdkArchitectureOption: x64
51+
jdkSourceOption: PreInstalled
52+
- task: NodeTool@0
53+
displayName: Use Node 20.x
54+
inputs:
55+
versionSpec: 20.x
56+
- task: Npm@1
57+
displayName: npm install
58+
inputs:
59+
verbose: false
60+
- task: CmdLine@2
61+
displayName: build server
62+
inputs:
63+
script: |-
64+
git clone https://github.com/microsoft/java-debug ../java-debug
65+
npm run build-server
66+
- task: CmdLine@2
67+
displayName: vsce package
68+
inputs:
69+
script: npx @vscode/vsce@latest package
70+
- task: CopyFiles@2
71+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
72+
inputs:
73+
Contents: "*.vsix"
74+
TargetFolder: $(Build.ArtifactStagingDirectory)/vsix

.azure-pipelines/nightly.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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

.azure-pipelines/rc.yml

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

0 commit comments

Comments
 (0)