Skip to content

Commit e1b43a9

Browse files
authored
build: Update ADO pipeline definitions (#823)
Signed-off-by: Sheng Chen <sheche@microsoft.com>
1 parent 9b8fe7e commit e1b43a9

File tree

2 files changed

+48
-12
lines changed

2 files changed

+48
-12
lines changed

.azure-pipelines/nightly.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

.azure-pipelines/rc.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ extends:
1616
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
1717
parameters:
1818
pool:
19-
os: linux
2019
name: 1ES_JavaTooling_Pool
21-
image: 1ES_JavaTooling_Ubuntu-2004
20+
image: 1ES_JavaTooling_Windows_2022
21+
os: windows
2222
sdl:
2323
sourceAnalysisPool:
2424
name: 1ES_JavaTooling_Pool
@@ -89,16 +89,34 @@ extends:
8989
"ToolVersion" : "1.0"
9090
}
9191
]
92-
- task: Bash@3
93-
displayName: Replace AI key
92+
- task: CmdLine@2
93+
displayName: Replace AI Key
9494
inputs:
95-
targetType: inline
96-
script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"$AI_KEY\""
95+
script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
9796
- task: Bash@3
9897
displayName: vsce package
9998
inputs:
10099
targetType: inline
101100
script: npx @vscode/vsce@latest package
101+
### Copy files for APIScan
102+
- task: CopyFiles@2
103+
displayName: "Copy Files for APIScan"
104+
inputs:
105+
Contents: "*.vsix"
106+
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
107+
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
108+
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
109+
- task: APIScan@2
110+
displayName: Run APIScan
111+
inputs:
112+
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
113+
softwareName: "vscode-java-dependency"
114+
softwareVersionNum: "$(Build.BuildId)"
115+
isLargeApp: false
116+
toolVersion: "Latest"
117+
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
118+
env:
119+
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
102120
- task: CopyFiles@2
103121
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
104122
inputs:

0 commit comments

Comments
 (0)