119 строки
4.8 KiB
YAML
119 строки
4.8 KiB
YAML
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 17
|
|
inputs:
|
|
versionSpec: '17'
|
|
jdkArchitectureOption: 'x64'
|
|
jdkSourceOption: 'PreInstalled'
|
|
- task: NodeTool@0
|
|
displayName: Install Node 18.x
|
|
inputs:
|
|
versionSpec: 18.x
|
|
- 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 Plugin Artifacts'
|
|
inputs:
|
|
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs/plugins'
|
|
Contents: '**'
|
|
TargetFolder: $(Build.SourcesDirectory)/extension/server/plugins
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Build Server Artifacts'
|
|
inputs:
|
|
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs'
|
|
Contents: 'server.jar'
|
|
TargetFolder: $(Build.SourcesDirectory)/gradle-server/build/libs
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Build Server Runtime Artifacts'
|
|
inputs:
|
|
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs/runtime'
|
|
Contents: '**'
|
|
TargetFolder: $(Build.SourcesDirectory)/gradle-server/build/libs/runtime
|
|
- 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: Gradle@2
|
|
displayName: Build Gradle Build Server Importer
|
|
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)
|