From f7ec4ae0933483b68e895ed203a64bbc7ee81603 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Fri, 1 Mar 2024 13:51:30 +0800 Subject: [PATCH] Update rc.yml for api scan --- .azure-pipelines/rc.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/rc.yml b/.azure-pipelines/rc.yml index fdaf877..14b3078 100644 --- a/.azure-pipelines/rc.yml +++ b/.azure-pipelines/rc.yml @@ -23,9 +23,9 @@ extends: template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines parameters: pool: - os: linux name: 1ES_JavaTooling_Pool - image: 1ES_JavaTooling_Ubuntu-2004 + image: 1ES_JavaTooling_Windows_2022 + os: windows sdl: sourceAnalysisPool: name: 1ES_JavaTooling_Pool @@ -77,6 +77,25 @@ extends: displayName: vsce package inputs: script: npx @vscode/vsce@latest package + ### Copy files for APIScan + - task: CopyFiles@2 + displayName: "Copy Files for APIScan" + inputs: + Contents: "*.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-java-debug" + 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 Files to: $(Build.ArtifactStagingDirectory)/vsix" inputs: