-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
parameters: | ||
apiScanDirectory: $(Agent.TempDirectory)\APIScanFiles # The directory to copy and scan assemblies | ||
mainBranchName: # The "main" branch that should be used - can be something other than "main" | ||
|
||
steps: | ||
|
||
### Copy .dll and .pdb files for APIScan | ||
- task: CopyFiles@2 | ||
displayName: 'Collect Files for APIScan' | ||
inputs: | ||
Contents: | | ||
generated\**\bin\Release\**\?(*.dll|*.pdb) | ||
util\**\bin\Release\**\?(*.dll|*.pdb) | ||
TargetFolder: ${{ parameters.apiScanDirectory }} | ||
OverWrite: true | ||
flattenFolders: true | ||
condition: and(succeeded(), eq(variables['runAPIScan'], 'true'), eq('refs/heads/${{ parameters.mainBranchName }}', variables['Build.SourceBranch'])) | ||
|
||
- task: CmdLine@2 | ||
displayName: 'List Files for APIScan' | ||
inputs: | ||
script: | | ||
tree ${{ parameters.apiScanDirectory }} /f | ||
condition: and(succeeded(), eq(variables['runAPIScan'], 'true'), eq('refs/heads/${{ parameters.mainBranchName }}', variables['Build.SourceBranch'])) | ||
|
||
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task | ||
- task: APIScan@2 | ||
displayName: Run APIScan | ||
inputs: | ||
softwareFolder: ${{ parameters.apiScanDirectory }} | ||
softwareName: $(ApiScanName) | ||
softwareVersionNum: '$(Build.BuildId)' | ||
isLargeApp: true | ||
toolVersion: Latest | ||
condition: and(succeeded(), eq(variables['runAPIScan'], 'true'), eq('refs/heads/${{ parameters.mainBranchName }}', variables['Build.SourceBranch'])) | ||
env: | ||
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters