Skip to content

Commit dab22f6

Browse files
authored
build: Migrate to 1ES pipeline (#1280)
Signed-off-by: sheche <[email protected]>
1 parent 7134037 commit dab22f6

File tree

4 files changed

+203
-0
lines changed

4 files changed

+203
-0
lines changed

.azure-pipelines/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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-9247-Tool
32+
stages:
33+
- stage: Build
34+
jobs:
35+
- job: Job_1
36+
displayName: Agent job 1
37+
templateContext:
38+
outputs:
39+
- output: pipelineArtifact
40+
artifactName: drop
41+
targetPath: $(Build.ArtifactStagingDirectory)
42+
displayName: "Publish Artifact: drop"
43+
steps:
44+
- checkout: self
45+
fetchTags: true
46+
- task: NodeTool@0
47+
displayName: Use Node 16.x
48+
inputs:
49+
versionSpec: 16.x
50+
- task: Npm@1
51+
displayName: npm install
52+
inputs:
53+
verbose: false
54+
- task: CmdLine@2
55+
displayName: Command Line Script
56+
inputs:
57+
script: npx @vscode/vsce@latest package
58+
- task: CopyFiles@2
59+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
60+
inputs:
61+
Contents: "*.vsix"
62+
TargetFolder: $(Build.ArtifactStagingDirectory)

.azure-pipelines/nightly.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: $(Date:yyyyMMdd).$(Rev:r)
2+
variables:
3+
- name: Codeql.Enabled
4+
value: true
5+
schedules:
6+
- cron: 0 0 * * *
7+
branches:
8+
include:
9+
- main
10+
resources:
11+
repositories:
12+
- repository: self
13+
type: git
14+
ref: refs/heads/main
15+
- repository: 1esPipelines
16+
type: git
17+
name: 1ESPipelineTemplates/1ESPipelineTemplates
18+
ref: refs/tags/release
19+
trigger: none
20+
extends:
21+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
22+
parameters:
23+
pool:
24+
os: linux
25+
name: 1ES_JavaTooling_Pool
26+
image: 1ES_JavaTooling_Ubuntu-2004
27+
sdl:
28+
sourceAnalysisPool:
29+
name: 1ES_JavaTooling_Pool
30+
image: 1ES_JavaTooling_Windows_2022
31+
os: windows
32+
customBuildTags:
33+
- MigrationTooling-mseng-VSJava-13437-Tool
34+
stages:
35+
- stage: Build
36+
jobs:
37+
- job: Job_1
38+
displayName: Agent job 1
39+
templateContext:
40+
outputs:
41+
- output: pipelineArtifact
42+
artifactName: vsix
43+
targetPath: $(Build.ArtifactStagingDirectory)
44+
displayName: "Publish Artifact: vsix"
45+
steps:
46+
- checkout: self
47+
clean: true
48+
fetchTags: false
49+
- task: NodeTool@0
50+
displayName: Use Node 16.x
51+
inputs:
52+
versionSpec: 16.x
53+
- task: Npm@1
54+
displayName: npm install
55+
inputs:
56+
verbose: false
57+
- task: CmdLine@2
58+
displayName: Replace AI Key
59+
inputs:
60+
script: npx [email protected] -I -f package.json -e "this.aiKey=\"$AI_KEY\""
61+
- task: Bash@3
62+
displayName: update version in package json
63+
inputs:
64+
targetType: inline
65+
script: |-
66+
node ./scripts/prepare-nightly-build.js
67+
mv ./package.insiders.json ./package.json
68+
- task: CmdLine@2
69+
displayName: VSCE package --pre-release
70+
inputs:
71+
script: npx @vscode/vsce@latest package --pre-release
72+
- task: CopyFiles@2
73+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
74+
inputs:
75+
Contents: "*.vsix"
76+
TargetFolder: $(Build.ArtifactStagingDirectory)

.azure-pipelines/rc.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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: none
15+
extends:
16+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
17+
parameters:
18+
pool:
19+
os: linux
20+
name: 1ES_JavaTooling_Pool
21+
image: 1ES_JavaTooling_Ubuntu-2004
22+
sdl:
23+
sourceAnalysisPool:
24+
name: 1ES_JavaTooling_Pool
25+
image: 1ES_JavaTooling_Windows_2022
26+
os: windows
27+
customBuildTags:
28+
- MigrationTooling-mseng-VSJava-9248-Tool
29+
stages:
30+
- stage: Build
31+
jobs:
32+
- job: Job_1
33+
displayName: Agent job 1
34+
templateContext:
35+
outputs:
36+
- output: pipelineArtifact
37+
artifactName: vsix
38+
targetPath: $(Build.ArtifactStagingDirectory)
39+
displayName: "Publish Artifact: vsix"
40+
steps:
41+
- checkout: self
42+
clean: true
43+
fetchTags: false
44+
- task: NodeTool@0
45+
displayName: Use Node 16.x
46+
inputs:
47+
versionSpec: 16.x
48+
- task: Npm@1
49+
displayName: npm install
50+
inputs:
51+
verbose: false
52+
- task: CmdLine@2
53+
displayName: Replace AI Key
54+
inputs:
55+
script: npx [email protected] -I -f package.json -e "this.aiKey=\"$AI_KEY\""
56+
- task: CmdLine@2
57+
displayName: VSCE package
58+
inputs:
59+
script: npx @vscode/vsce@latest package
60+
- task: CopyFiles@2
61+
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
62+
inputs:
63+
Contents: "*.vsix"
64+
TargetFolder: $(Build.ArtifactStagingDirectory)

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ webpack.config.js
1414
out/**/*.map
1515
*.vsix
1616
scripts
17+
.azure-pipelines/**

0 commit comments

Comments
 (0)