Skip to content

Commit 04f6c3d

Browse files
authored
Migrate to 1ES pipelines (#234)
* Migrate to 1ES pipelines * Update @vscode/test-electron
1 parent ff6d688 commit 04f6c3d

File tree

6 files changed

+225
-142
lines changed

6 files changed

+225
-142
lines changed

.azure-pipelines/ci.yml

Lines changed: 66 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,68 @@
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
114
trigger:
2-
- main
3-
4-
jobs:
5-
- job: static_analysis
6-
displayName: Static Code Analysis
15+
branches:
16+
include:
17+
- main
18+
extends:
19+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
20+
parameters:
721
pool:
8-
vmImage: 'windows-latest'
9-
steps:
10-
- task: JavaToolInstaller@0
11-
displayName: 'Use Java 17'
12-
inputs:
13-
versionSpec: 17
14-
jdkArchitectureOption: x64
15-
jdkSourceOption: PreInstalled
16-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
17-
displayName: 'Run CredScan'
18-
inputs:
19-
toolMajorVersion: V2
20-
verboseOutput: true
21-
debugMode: false
22-
- task: PostAnalysis@1
23-
displayName: 'Post Analysis'
24-
inputs:
25-
CredScan: true
26-
ToolLogsNotFoundAction: 'Standard'
27-
28-
- job: ci
29-
displayName: VS Code Maven CI
30-
pool:
31-
vmImage: 'ubuntu-latest'
32-
steps:
33-
- task: Npm@1
34-
displayName: 'npm install'
35-
inputs:
36-
verbose: false
37-
- task: Npm@1
38-
displayName: 'npm run tslint'
39-
inputs:
40-
command: custom
41-
verbose: false
42-
customCommand: 'run tslint'
43-
- task: Npm@1
44-
displayName: 'npm run compile'
45-
inputs:
46-
command: custom
47-
verbose: false
48-
customCommand: 'run compile'
49-
- script: 'npx @vscode/vsce@latest package'
50-
displayName: 'package vsix'
51-
- task: CopyFiles@2
52-
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
53-
inputs:
54-
Contents: '*.vsix'
55-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
56-
- task: PublishBuildArtifacts@1
57-
displayName: 'Publish Artifact: drop'
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: Npm@1
47+
displayName: 'npm install'
48+
inputs:
49+
verbose: false
50+
- task: Npm@1
51+
displayName: 'npm run tslint'
52+
inputs:
53+
command: custom
54+
verbose: false
55+
customCommand: 'run tslint'
56+
- task: Npm@1
57+
displayName: 'npm run compile'
58+
inputs:
59+
command: custom
60+
verbose: false
61+
customCommand: 'run compile'
62+
- script: 'npx @vscode/vsce@latest package'
63+
displayName: 'package vsix'
64+
- task: CopyFiles@2
65+
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
66+
inputs:
67+
Contents: '*.vsix'
68+
TargetFolder: '$(Build.ArtifactStagingDirectory)'

.azure-pipelines/nightly.yml

Lines changed: 74 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,80 @@
1-
trigger: none
2-
pr: none
3-
1+
name: $(Date:yyyyMMdd).$(Rev:r)
2+
variables:
3+
- name: Codeql.Enabled
4+
value: true
45
schedules:
56
- cron: "0 3 * * *"
67
displayName: Daily 3am build
78
branches:
89
include:
910
- main
10-
11-
pool:
12-
vmImage: 'ubuntu-latest'
13-
steps:
14-
- task: Npm@1
15-
displayName: 'npm install'
16-
inputs:
17-
verbose: false
18-
- task: Npm@1
19-
displayName: 'npm run tslint'
20-
inputs:
21-
command: custom
22-
verbose: false
23-
customCommand: 'run tslint'
24-
- task: Npm@1
25-
displayName: 'npm run compile'
26-
inputs:
27-
command: custom
28-
verbose: false
29-
customCommand: 'run compile'
30-
- bash: |
31-
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
32-
displayName: Replace AI Key
33-
- bash: |
34-
node ./scripts/prepare-nightly-build.js
35-
mv ./package.insiders.json ./package.json
36-
displayName: Generate new package.json
37-
- script: 'npx @vscode/vsce@latest package --pre-release'
38-
displayName: 'package vsix'
39-
- task: CopyFiles@2
40-
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
41-
inputs:
42-
Contents: '*.vsix'
43-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
44-
- task: PublishBuildArtifacts@1
45-
displayName: 'Publish Artifact: drop'
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+
pr: 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-13437-Tool
36+
stages:
37+
- stage: Build
38+
jobs:
39+
- job: Job_1
40+
displayName: Agent job 1
41+
templateContext:
42+
outputs:
43+
- output: pipelineArtifact
44+
artifactName: vsix
45+
targetPath: $(Build.ArtifactStagingDirectory)
46+
displayName: "Publish Artifact: vsix"
47+
steps:
48+
- checkout: self
49+
clean: true
50+
fetchTags: false
51+
- task: Npm@1
52+
displayName: 'npm install'
53+
inputs:
54+
verbose: false
55+
- task: Npm@1
56+
displayName: 'npm run tslint'
57+
inputs:
58+
command: custom
59+
verbose: false
60+
customCommand: 'run tslint'
61+
- task: Npm@1
62+
displayName: 'npm run compile'
63+
inputs:
64+
command: custom
65+
verbose: false
66+
customCommand: 'run compile'
67+
- bash: |
68+
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
69+
displayName: Replace AI Key
70+
- bash: |
71+
node ./scripts/prepare-nightly-build.js
72+
mv ./package.insiders.json ./package.json
73+
displayName: Generate new package.json
74+
- script: 'npx @vscode/vsce@latest package --pre-release'
75+
displayName: 'package vsix'
76+
- task: CopyFiles@2
77+
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
78+
inputs:
79+
Contents: '*.vsix'
80+
TargetFolder: '$(Build.ArtifactStagingDirectory)'

.azure-pipelines/rc.yml

Lines changed: 68 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +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
114
trigger: none
215
pr: none
3-
4-
pool:
5-
vmImage: 'ubuntu-latest'
6-
steps:
7-
- task: Npm@1
8-
displayName: 'npm install'
9-
inputs:
10-
verbose: false
11-
- task: Npm@1
12-
displayName: 'npm run tslint'
13-
inputs:
14-
command: custom
15-
verbose: false
16-
customCommand: 'run tslint'
17-
- task: Npm@1
18-
displayName: 'npm run compile'
19-
inputs:
20-
command: custom
21-
verbose: false
22-
customCommand: 'run compile'
23-
- bash: |
24-
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
25-
displayName: Replace AI Key
26-
- script: 'npx @vscode/vsce@latest package'
27-
displayName: 'package vsix'
28-
- task: CopyFiles@2
29-
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
30-
inputs:
31-
Contents: '*.vsix'
32-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
33-
- task: PublishBuildArtifacts@1
34-
displayName: 'Publish Artifact: drop'
16+
extends:
17+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
18+
parameters:
19+
pool:
20+
os: linux
21+
name: 1ES_JavaTooling_Pool
22+
image: 1ES_JavaTooling_Ubuntu-2004
23+
sdl:
24+
sourceAnalysisPool:
25+
name: 1ES_JavaTooling_Pool
26+
image: 1ES_JavaTooling_Windows_2022
27+
os: windows
28+
customBuildTags:
29+
- MigrationTooling-mseng-VSJava-13437-Tool
30+
stages:
31+
- stage: Build
32+
jobs:
33+
- job: Job_1
34+
displayName: Agent job 1
35+
templateContext:
36+
outputs:
37+
- output: pipelineArtifact
38+
artifactName: vsix
39+
targetPath: $(Build.ArtifactStagingDirectory)
40+
displayName: "Publish Artifact: vsix"
41+
steps:
42+
- checkout: self
43+
clean: true
44+
fetchTags: false
45+
- task: Npm@1
46+
displayName: 'npm install'
47+
inputs:
48+
verbose: false
49+
- task: Npm@1
50+
displayName: 'npm run tslint'
51+
inputs:
52+
command: custom
53+
verbose: false
54+
customCommand: 'run tslint'
55+
- task: Npm@1
56+
displayName: 'npm run compile'
57+
inputs:
58+
command: custom
59+
verbose: false
60+
customCommand: 'run compile'
61+
- bash: |
62+
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
63+
displayName: Replace AI Key
64+
- script: 'npx @vscode/vsce@latest package'
65+
displayName: 'package vsix'
66+
- task: CopyFiles@2
67+
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
68+
inputs:
69+
Contents: '*.vsix'
70+
TargetFolder: '$(Build.ArtifactStagingDirectory)'

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ node_modules/**
1313
out/**
1414
.*
1515
scripts
16+
.azure-pipelines/**

0 commit comments

Comments
 (0)