* Migrate to 1ES pipelines

* Update @vscode/test-electron
This commit is contained in:
Sheng Chen 2024-01-15 16:00:52 +08:00 коммит произвёл GitHub
Родитель ff6d688ae4
Коммит 04f6c3ddb8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 225 добавлений и 142 удалений

Просмотреть файл

@ -1,57 +1,68 @@
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: Codeql.Enabled
value: true
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger:
- main
jobs:
- job: static_analysis
displayName: Static Code Analysis
branches:
include:
- main
extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
pool:
vmImage: 'windows-latest'
steps:
- task: JavaToolInstaller@0
displayName: 'Use Java 17'
inputs:
versionSpec: 17
jdkArchitectureOption: x64
jdkSourceOption: PreInstalled
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
inputs:
toolMajorVersion: V2
verboseOutput: true
debugMode: false
- task: PostAnalysis@1
displayName: 'Post Analysis'
inputs:
CredScan: true
ToolLogsNotFoundAction: 'Standard'
- job: ci
displayName: VS Code Maven CI
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- script: 'npx @vscode/vsce@latest package'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
os: linux
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Ubuntu-2004
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
customBuildTags:
- MigrationTooling-mseng-VSJava-9247-Tool
stages:
- stage: Build
jobs:
- job: Job_1
displayName: Agent job 1
templateContext:
outputs:
- output: pipelineArtifact
artifactName: drop
targetPath: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact: drop"
steps:
- checkout: self
fetchTags: true
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- script: 'npx @vscode/vsce@latest package'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

Просмотреть файл

@ -1,45 +1,80 @@
trigger: none
pr: none
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: Codeql.Enabled
value: true
schedules:
- cron: "0 3 * * *"
displayName: Daily 3am build
branches:
include:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- bash: |
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
displayName: Replace AI Key
- bash: |
node ./scripts/prepare-nightly-build.js
mv ./package.insiders.json ./package.json
displayName: Generate new package.json
- script: 'npx @vscode/vsce@latest package --pre-release'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger: none
pr: none
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
pool:
os: linux
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Ubuntu-2004
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
customBuildTags:
- MigrationTooling-mseng-VSJava-13437-Tool
stages:
- stage: Build
jobs:
- job: Job_1
displayName: Agent job 1
templateContext:
outputs:
- output: pipelineArtifact
artifactName: vsix
targetPath: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact: vsix"
steps:
- checkout: self
clean: true
fetchTags: false
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- bash: |
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
displayName: Replace AI Key
- bash: |
node ./scripts/prepare-nightly-build.js
mv ./package.insiders.json ./package.json
displayName: Generate new package.json
- script: 'npx @vscode/vsce@latest package --pre-release'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

Просмотреть файл

@ -1,34 +1,70 @@
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: Codeql.Enabled
value: true
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger: none
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- bash: |
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
displayName: Replace AI Key
- script: 'npx @vscode/vsce@latest package'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
pool:
os: linux
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Ubuntu-2004
sdl:
sourceAnalysisPool:
name: 1ES_JavaTooling_Pool
image: 1ES_JavaTooling_Windows_2022
os: windows
customBuildTags:
- MigrationTooling-mseng-VSJava-13437-Tool
stages:
- stage: Build
jobs:
- job: Job_1
displayName: Agent job 1
templateContext:
outputs:
- output: pipelineArtifact
artifactName: vsix
targetPath: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact: vsix"
steps:
- checkout: self
clean: true
fetchTags: false
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run tslint'
inputs:
command: custom
verbose: false
customCommand: 'run tslint'
- task: Npm@1
displayName: 'npm run compile'
inputs:
command: custom
verbose: false
customCommand: 'run compile'
- bash: |
npx json@latest -I -f package.json -e "this.aiKey=\"$(AI_KEY)\""
displayName: Replace AI Key
- script: 'npx @vscode/vsce@latest package'
displayName: 'package vsix'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

Просмотреть файл

@ -13,3 +13,4 @@ node_modules/**
out/**
.*
scripts
.azure-pipelines/**

30
package-lock.json сгенерированный
Просмотреть файл

@ -25,7 +25,7 @@
"@types/node": "^16.18.3",
"@types/vscode": "1.74.0",
"@types/xml2js": "^0.4.11",
"@vscode/test-electron": "^2.1.5",
"@vscode/test-electron": "^2.3.8",
"glob": "^7.2.3",
"mocha": "^9.2.2",
"ts-loader": "^9.4.2",
@ -377,15 +377,15 @@
}
},
"node_modules/@vscode/test-electron": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz",
"integrity": "sha512-fwzA9RtazH1GT/sckYlbxu6t5e4VaMXwCVtyLv4UAG0hP6NTfnMaaG25XCfWqlVwFhBMcQXHBCy5dmz2eLUnkw==",
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz",
"integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==",
"dev": true,
"dependencies": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"jszip": "^3.10.1",
"semver": "^7.3.8"
"semver": "^7.5.2"
},
"engines": {
"node": ">=16"
@ -2394,9 +2394,9 @@
}
},
"node_modules/semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@ -3474,15 +3474,15 @@
}
},
"@vscode/test-electron": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz",
"integrity": "sha512-fwzA9RtazH1GT/sckYlbxu6t5e4VaMXwCVtyLv4UAG0hP6NTfnMaaG25XCfWqlVwFhBMcQXHBCy5dmz2eLUnkw==",
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz",
"integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==",
"dev": true,
"requires": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"jszip": "^3.10.1",
"semver": "^7.3.8"
"semver": "^7.5.2"
}
},
"@webassemblyjs/ast": {
@ -5007,9 +5007,9 @@
}
},
"semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"

Просмотреть файл

@ -184,7 +184,7 @@
"@types/node": "^16.18.3",
"@types/vscode": "1.74.0",
"@types/xml2js": "^0.4.11",
"@vscode/test-electron": "^2.1.5",
"@vscode/test-electron": "^2.3.8",
"glob": "^7.2.3",
"mocha": "^9.2.2",
"ts-loader": "^9.4.2",