diff --git a/.azure-pipelines/nightly.yml b/.azure-pipelines/nightly.yml index f7892014..c24f01a0 100644 --- a/.azure-pipelines/nightly.yml +++ b/.azure-pipelines/nightly.yml @@ -21,9 +21,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 @@ -98,7 +98,7 @@ extends: displayName: Replace AI key inputs: targetType: inline - 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: Bash@3 displayName: Bash Script inputs: @@ -111,6 +111,25 @@ extends: inputs: targetType: inline 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-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: diff --git a/.azure-pipelines/rc.yml b/.azure-pipelines/rc.yml index 671854a9..e9d73038 100644 --- a/.azure-pipelines/rc.yml +++ b/.azure-pipelines/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 @@ -93,12 +93,31 @@ extends: displayName: Replace AI key inputs: targetType: inline - 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: Bash@3 displayName: vsce package inputs: targetType: inline 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: