Skip to content

Commit 63839e6

Browse files
authored
Migrate to 1ES pipeline (#1428)
* Migrate to 1ES pipeline
1 parent 0a98107 commit 63839e6

File tree

6 files changed

+259
-11
lines changed

6 files changed

+259
-11
lines changed

.azure-pipelines/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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 17
48+
inputs:
49+
versionSpec: "17"
50+
jdkArchitectureOption: x64
51+
jdkSourceOption: PreInstalled
52+
- task: Npm@1
53+
displayName: npm install
54+
inputs:
55+
verbose: false
56+
- task: CmdLine@2
57+
displayName: build server
58+
inputs:
59+
script: |-
60+
git clone https://github.com/microsoft/java-debug ../java-debug
61+
npm run build-server
62+
- task: CmdLine@2
63+
displayName: vsce package
64+
inputs:
65+
script: npx @vscode/vsce@latest package
66+
- task: CopyFiles@2
67+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
68+
inputs:
69+
Contents: "*.vsix"
70+
TargetFolder: $(Build.ArtifactStagingDirectory)/vsix

.azure-pipelines/nightly.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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: 1esPipelines
23+
type: git
24+
name: 1ESPipelineTemplates/1ESPipelineTemplates
25+
ref: refs/tags/release
26+
trigger: none
27+
extends:
28+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
29+
parameters:
30+
pool:
31+
os: linux
32+
name: 1ES_JavaTooling_Pool
33+
image: 1ES_JavaTooling_Ubuntu-2004
34+
sdl:
35+
sourceAnalysisPool:
36+
name: 1ES_JavaTooling_Pool
37+
image: 1ES_JavaTooling_Windows_2022
38+
os: windows
39+
customBuildTags:
40+
- MigrationTooling-mseng-VSJava-13475-Tool
41+
stages:
42+
- stage: Build
43+
jobs:
44+
- job: Job_1
45+
displayName: VSCode-Java-Debug-Nightly
46+
templateContext:
47+
outputs:
48+
- output: pipelineArtifact
49+
artifactName: vsix
50+
targetPath: $(Build.ArtifactStagingDirectory)/vsix
51+
displayName: "Publish Artifact: vsix"
52+
steps:
53+
- checkout: self
54+
fetchTags: false
55+
- task: DownloadBuildArtifacts@1
56+
displayName: Download Build Artifacts
57+
inputs:
58+
buildType: specific
59+
project: a4d27ce2-a42d-4b71-8eef-78cee9a9728e
60+
definition: "16485"
61+
specificBuildWithTriggering: true
62+
downloadType: specific
63+
itemPattern: plugin/jars/com.microsoft.java.debug.plugin-*.jar
64+
extractTars: false
65+
- task: CmdLine@2
66+
displayName: cp plugin.jar to server
67+
inputs:
68+
script: |-
69+
mkdir -p server
70+
71+
cp $(System.ArtifactsDirectory)/plugin/jars/com.microsoft.java.debug.plugin-*[!a-zA-Z].jar server/
72+
ls -l 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
87+
inputs:
88+
script: npx @vscode/vsce@latest package --pre-release
89+
- task: CopyFiles@2
90+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
91+
inputs:
92+
Contents: "*.vsix"
93+
TargetFolder: $(Build.ArtifactStagingDirectory)/vsix

.azure-pipelines/rc.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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: 1esPipelines
18+
type: git
19+
name: 1ESPipelineTemplates/1ESPipelineTemplates
20+
ref: refs/tags/release
21+
trigger: none
22+
extends:
23+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
24+
parameters:
25+
pool:
26+
os: linux
27+
name: 1ES_JavaTooling_Pool
28+
image: 1ES_JavaTooling_Ubuntu-2004
29+
sdl:
30+
sourceAnalysisPool:
31+
name: 1ES_JavaTooling_Pool
32+
image: 1ES_JavaTooling_Windows_2022
33+
os: windows
34+
customBuildTags:
35+
- MigrationTooling-mseng-VSJava-9157-Tool
36+
stages:
37+
- stage: Build
38+
jobs:
39+
- job: Job_1
40+
displayName: VSCode-Java-Debug-RC
41+
templateContext:
42+
outputs:
43+
- output: pipelineArtifact
44+
artifactName: vsix
45+
targetPath: $(Build.ArtifactStagingDirectory)/vsix
46+
displayName: "Publish Artifact: vsix"
47+
steps:
48+
- checkout: self
49+
fetchTags: true
50+
- task: DownloadBuildArtifacts@1
51+
displayName: Download Build Artifacts
52+
inputs:
53+
buildType: specific
54+
project: a4d27ce2-a42d-4b71-8eef-78cee9a9728e
55+
definition: "16486"
56+
specificBuildWithTriggering: true
57+
downloadType: specific
58+
itemPattern: m2/com.microsoft.java.debug.plugin/com.microsoft.java.debug.plugin-*.jar
59+
extractTars: false
60+
- task: CmdLine@2
61+
displayName: cp plugin.jar to server
62+
inputs:
63+
script: |-
64+
mkdir -p server
65+
66+
cp $(System.ArtifactsDirectory)/m2/com.microsoft.java.debug.plugin/com.microsoft.java.debug.plugin-*[!a-zA-Z].jar server/
67+
ls -l server/
68+
- task: Npm@1
69+
displayName: npm install
70+
inputs:
71+
verbose: false
72+
- task: CmdLine@2
73+
displayName: Replace AI key
74+
inputs:
75+
script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"$AI_KEY\""
76+
- task: CmdLine@2
77+
displayName: vsce package
78+
inputs:
79+
script: npx @vscode/vsce@latest package
80+
- task: CopyFiles@2
81+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)/vsix"
82+
inputs:
83+
Contents: "*.vsix"
84+
TargetFolder: $(Build.ArtifactStagingDirectory)/vsix

.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ packages
1717
package-lock.json
1818
node_modules
1919
webpack.config.js
20-
.DS_Store
20+
.DS_Store
21+
.azure-pipelines/**

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@
10001000
"@types/node": "^14.18.53",
10011001
"@types/uuid": "^8.3.4",
10021002
"@types/vscode": "1.75.0",
1003-
"@vscode/test-electron": "^2.3.3",
1003+
"@vscode/test-electron": "^2.3.8",
10041004
"mocha": "^10.2.0",
10051005
"ts-loader": "^9.4.4",
10061006
"tslint": "^6.1.3",

0 commit comments

Comments
 (0)