@@ -21,9 +21,9 @@ extends:
2121 template : v1/1ES.Official.PipelineTemplate.yml@1esPipelines
2222 parameters :
2323 pool :
24- os : linux
2524 name : 1ES_JavaTooling_Pool
26- image : 1ES_JavaTooling_Ubuntu-2004
25+ image : 1ES_JavaTooling_Windows_2022
26+ os : windows
2727 sdl :
2828 sourceAnalysisPool :
2929 name : 1ES_JavaTooling_Pool
@@ -94,11 +94,10 @@ extends:
9494 "ToolVersion" : "1.0"
9595 }
9696 ]
97- - task : Bash@3
98- displayName : Replace AI key
97+ - task : CmdLine@2
98+ displayName : Replace AI Key
9999 inputs :
100- targetType : inline
101- script : npx json@9.0.6 -I -f package.json -e "this.aiKey=\"$AI_KEY\""
100+ script : npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
102101 - task : Bash@3
103102 displayName : Bash Script
104103 inputs :
@@ -111,6 +110,25 @@ extends:
111110 inputs :
112111 targetType : inline
113112 script : npx @vscode/vsce@latest package --pre-release
113+ # ## Copy files for APIScan
114+ - task : CopyFiles@2
115+ displayName : " Copy Files for APIScan"
116+ inputs :
117+ Contents : " *.vsix"
118+ TargetFolder : $(Agent.TempDirectory)/APIScanFiles
119+ condition : and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
120+ # ## Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
121+ - task : APIScan@2
122+ displayName : Run APIScan
123+ inputs :
124+ softwareFolder : $(Agent.TempDirectory)/APIScanFiles
125+ softwareName : " vscode-java-dependency"
126+ softwareVersionNum : " $(Build.BuildId)"
127+ isLargeApp : false
128+ toolVersion : " Latest"
129+ condition : and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
130+ env :
131+ AzureServicesAuthConnectionString : runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
114132 - task : CopyFiles@2
115133 displayName : " Copy Files to: $(Build.ArtifactStagingDirectory)"
116134 inputs :
0 commit comments