Skip to content

Commit af08baf

Browse files
build: Update vscode-java-test-nightly.yml for api scan (#1669)
Co-authored-by: Sheng Chen <[email protected]>
1 parent 6fe3a0c commit af08baf

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.azure-pipelines/vscode-java-test-nightly.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ extends:
2222
parameters:
2323
pool:
2424
name: 1ES_JavaTooling_Pool
25-
image: 1ES_JavaTooling_Ubuntu-2004
26-
os: linux
25+
image: 1ES_JavaTooling_Windows_2022
26+
os: windows
2727
sdl:
2828
sourceAnalysisPool:
2929
name: 1ES_JavaTooling_Pool
@@ -76,7 +76,7 @@ extends:
7676
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
7777
displayName: ESRP CodeSigning
7878
inputs:
79-
ConnectedServiceName: vscjavaci_codesign
79+
ConnectedServiceName: vscjavaci_esrp_codesign
8080
FolderPath: server
8181
Pattern: com.microsoft.java.test.*.jar
8282
signConfigType: inlineSignParams
@@ -103,7 +103,7 @@ extends:
103103
- task: CmdLine@2
104104
displayName: Replace AI Key
105105
inputs:
106-
script: npx [email protected] -I -f package.json -e "this.aiKey=\"$AI_KEY\""
106+
script: npx [email protected] -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
107107
- task: Bash@3
108108
displayName: Bash Script
109109
inputs:
@@ -115,6 +115,25 @@ extends:
115115
displayName: vsce package --pre-release
116116
inputs:
117117
script: npx @vscode/vsce@latest package --pre-release
118+
### Copy files for APIScan
119+
- task: CopyFiles@2
120+
displayName: "Copy Files for APIScan"
121+
inputs:
122+
Contents: "*.vsix"
123+
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
124+
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
125+
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
126+
- task: APIScan@2
127+
displayName: Run APIScan
128+
inputs:
129+
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
130+
softwareName: "vscode-java-test"
131+
softwareVersionNum: "$(Build.BuildId)"
132+
isLargeApp: false
133+
toolVersion: "Latest"
134+
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
135+
env:
136+
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
118137
- task: CopyFiles@2
119138
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
120139
inputs:

0 commit comments

Comments
 (0)