From 8296842c64dddd477af38d2ee67583003f52c535 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Fri, 1 Mar 2024 14:47:52 +0800 Subject: [PATCH 1/2] Update vscode-java-test-rc.yml for api scan --- .azure-pipelines/vscode-java-test-rc.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/vscode-java-test-rc.yml b/.azure-pipelines/vscode-java-test-rc.yml index fcb6587a..6398eb6a 100644 --- a/.azure-pipelines/vscode-java-test-rc.yml +++ b/.azure-pipelines/vscode-java-test-rc.yml @@ -16,9 +16,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 @@ -103,6 +103,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-test" + 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)" inputs: From e83560fd8ac7671bb72a4f672ec668fcea863701 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Mon, 4 Mar 2024 13:20:56 +0800 Subject: [PATCH 2/2] Update code sign connection and replace ai key command --- .azure-pipelines/vscode-java-test-rc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/vscode-java-test-rc.yml b/.azure-pipelines/vscode-java-test-rc.yml index 6398eb6a..9c5e811e 100644 --- a/.azure-pipelines/vscode-java-test-rc.yml +++ b/.azure-pipelines/vscode-java-test-rc.yml @@ -71,7 +71,7 @@ extends: - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2 displayName: ESRP CodeSigning inputs: - ConnectedServiceName: vscjavaci_codesign + ConnectedServiceName: vscjavaci_esrp_codesign FolderPath: server Pattern: com.microsoft.java.test.*.jar signConfigType: inlineSignParams @@ -98,7 +98,7 @@ extends: - task: CmdLine@2 displayName: Replace AI Key inputs: - script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"$AI_KEY\"" + script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\"" - task: CmdLine@2 displayName: vsce package inputs: