Extract api scan to a separate pipeline (#1498)
This commit is contained in:
Родитель
8ac81f7841
Коммит
40347755c7
|
@ -0,0 +1,112 @@
|
|||
name: $(Date:yyyyMMdd).$(Rev:r)
|
||||
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:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
image: 1ES_JavaTooling_Windows_2022
|
||||
os: windows
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
image: 1ES_JavaTooling_Windows_2022
|
||||
os: windows
|
||||
spotBugs:
|
||||
enabled: false
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
- job: Job_1
|
||||
displayName: VSCode-Gradle-API-SCAN
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
artifactName: extension
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
displayName: "Publish Artifact: extension"
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchTags: true
|
||||
- task: JavaToolInstaller@0
|
||||
displayName: Install Java 11
|
||||
inputs:
|
||||
versionSpec: '11'
|
||||
jdkArchitectureOption: 'x64'
|
||||
jdkSourceOption: 'PreInstalled'
|
||||
- task: NodeTool@0
|
||||
displayName: Install Node 16.14.2
|
||||
inputs:
|
||||
versionSpec: '16.14.2'
|
||||
- task: Gradle@2
|
||||
displayName: Build
|
||||
inputs:
|
||||
gradleWrapperFile: 'gradlew'
|
||||
gradleOptions: '-Xmx3072m'
|
||||
tasks: 'build'
|
||||
- task: Gradle@2
|
||||
displayName: PrepareForRelease
|
||||
inputs:
|
||||
gradleWrapperFile: 'gradlew'
|
||||
gradleOptions: '-Xmx3072m'
|
||||
tasks: 'prepareForRelease'
|
||||
- bash: chmod +x gradle-server
|
||||
workingDirectory: $(Build.SourcesDirectory)/extension/lib
|
||||
displayName: Set permission
|
||||
- task: DownloadBuildArtifacts@1
|
||||
displayName: 'Download Build Server Artifacts'
|
||||
inputs:
|
||||
buildType: specific
|
||||
project: 'a4d27ce2-a42d-4b71-8eef-78cee9a9728e'
|
||||
pipeline: 16493
|
||||
downloadType: specific
|
||||
extractTars: false
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Build Server Artifacts'
|
||||
inputs:
|
||||
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs'
|
||||
Contents: '**'
|
||||
TargetFolder: $(Build.SourcesDirectory)/extension/server
|
||||
- task: JavaToolInstaller@0
|
||||
displayName: Install Java 17
|
||||
inputs:
|
||||
versionSpec: '17'
|
||||
jdkArchitectureOption: 'x64'
|
||||
jdkSourceOption: 'PreInstalled'
|
||||
- task: Gradle@2
|
||||
displayName: Build
|
||||
inputs:
|
||||
gradleWrapperFile: 'gradlew'
|
||||
gradleOptions: '-Xmx3072m'
|
||||
tasks: ':extension:copyJdtlsPluginJar'
|
||||
- bash: npx @vscode/vsce@latest package
|
||||
workingDirectory: $(Build.SourcesDirectory)/extension
|
||||
displayName: Package VSIX
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files for APIScan"
|
||||
inputs:
|
||||
Contents: "extension/*.vsix"
|
||||
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
|
||||
- task: APIScan@2
|
||||
displayName: Run APIScan
|
||||
inputs:
|
||||
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
softwareName: "vscode-gradle"
|
||||
softwareVersionNum: "$(Build.BuildId)"
|
||||
isLargeApp: false
|
||||
toolVersion: "Latest"
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
env:
|
||||
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
|
|
@ -20,8 +20,8 @@ extends:
|
|||
parameters:
|
||||
pool:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
image: 1ES_JavaTooling_Windows_2022
|
||||
os: windows
|
||||
image: 1ES_JavaTooling_Ubuntu-2004
|
||||
os: linux
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
|
@ -183,25 +183,6 @@ extends:
|
|||
- bash: npx @vscode/vsce@latest package --pre-release
|
||||
workingDirectory: $(Build.SourcesDirectory)/extension
|
||||
displayName: Package VSIX
|
||||
### Copy files for APIScan
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files for APIScan"
|
||||
inputs:
|
||||
Contents: "extension/*.vsix"
|
||||
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
|
||||
- task: APIScan@2
|
||||
displayName: Run APIScan
|
||||
inputs:
|
||||
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
softwareName: "vscode-gradle"
|
||||
softwareVersionNum: "$(Build.BuildId)"
|
||||
isLargeApp: false
|
||||
toolVersion: "Latest"
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
env:
|
||||
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy VSIX
|
||||
inputs:
|
||||
|
|
|
@ -20,8 +20,8 @@ extends:
|
|||
parameters:
|
||||
pool:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
image: 1ES_JavaTooling_Windows_2022
|
||||
os: windows
|
||||
image: 1ES_JavaTooling_Ubuntu-2004
|
||||
os: linux
|
||||
sdl:
|
||||
sourceAnalysisPool:
|
||||
name: 1ES_JavaTooling_Pool
|
||||
|
@ -178,24 +178,6 @@ extends:
|
|||
- bash: npx @vscode/vsce@latest package
|
||||
workingDirectory: $(Build.SourcesDirectory)/extension
|
||||
displayName: Package VSIX
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files for APIScan"
|
||||
inputs:
|
||||
Contents: "extension/*.vsix"
|
||||
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
|
||||
- task: APIScan@2
|
||||
displayName: Run APIScan
|
||||
inputs:
|
||||
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
|
||||
softwareName: "vscode-gradle"
|
||||
softwareVersionNum: "$(Build.BuildId)"
|
||||
isLargeApp: false
|
||||
toolVersion: "Latest"
|
||||
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
||||
env:
|
||||
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy VSIX
|
||||
inputs:
|
||||
|
|
|
@ -129,7 +129,7 @@ export class BuildServerController implements Disposable {
|
|||
machineStatus.hasProjectAtWorkspaceRoot = (await this.hasProjectAtWorkspaceRoot()).toString();
|
||||
sendInfo("", {
|
||||
kind: "machineStatus",
|
||||
data: JSON.stringify(machineStatus),
|
||||
data2: JSON.stringify(machineStatus),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ export class Logger {
|
|||
this.log(error, LogVerbosity.ERROR);
|
||||
sendInfo("", {
|
||||
kind: "gradleTaskServerError",
|
||||
data: error,
|
||||
data2: error,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче