forked from microsoft/vscode-gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract api scan to a separate pipeline (microsoft#1498)
- Loading branch information
Showing
5 changed files
with
118 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters