From 823db018e2731834d072b1e4a7cd66cce313b7a5 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Fri, 1 Mar 2024 10:48:58 +0800 Subject: [PATCH] Update nightly.yml for api scan --- .azure-pipelines/nightly.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/nightly.yml b/.azure-pipelines/nightly.yml index 02cf301..c8aa097 100644 --- a/.azure-pipelines/nightly.yml +++ b/.azure-pipelines/nightly.yml @@ -28,9 +28,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 @@ -86,8 +86,27 @@ extends: displayName: vsce package --pre-release inputs: script: npx @vscode/vsce@latest package --pre-release + ### 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: Contents: "*.vsix" - TargetFolder: $(Build.ArtifactStagingDirectory)/vsix + TargetFolder: $(Build.ArtifactStagingDirectory)/vsix \ No newline at end of file