2019-06-20 12:30:36 +00:00
|
|
|
parameters:
|
|
|
|
overrideParameters: '' # Optional: to override values for parameters.
|
|
|
|
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
|
|
|
|
continueOnError: false # optional: determines whether to continue the build if the step errors;
|
|
|
|
dependsOn: '' # Optional: dependencies of the job
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: Run_SDL
|
|
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
|
|
displayName: Run SDL tool
|
|
|
|
variables:
|
|
|
|
- group: DotNet-VSTS-Bot
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
2019-06-22 12:29:08 +00:00
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: Download Build Artifacts
|
|
|
|
inputs:
|
|
|
|
buildType: current
|
|
|
|
downloadType: specific files
|
|
|
|
matchingPattern: "**"
|
|
|
|
downloadPath: $(Build.SourcesDirectory)\artifacts
|
2019-06-28 13:15:43 +00:00
|
|
|
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
|
|
|
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
|
|
|
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
|
|
|
displayName: Extract Blob Artifacts
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
|
|
|
-InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
|
|
|
-ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
|
|
|
displayName: Extract Package Artifacts
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
2019-06-20 12:30:36 +00:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
displayName: 'Install NuGet.exe'
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'Install Guardian'
|
|
|
|
inputs:
|
|
|
|
restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
|
|
|
|
feedsToUse: config
|
|
|
|
nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config
|
|
|
|
externalFeedCredentials: GuardianConnect
|
|
|
|
restoreDirectory: $(Build.SourcesDirectory)\.packages
|
|
|
|
- ${{ if ne(parameters.overrideParameters, '') }}:
|
|
|
|
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1 ${{ parameters.overrideParameters }}
|
|
|
|
displayName: Execute SDL
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
- ${{ if eq(parameters.overrideParameters, '') }}:
|
|
|
|
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
|
2019-06-26 20:33:53 +00:00
|
|
|
-GuardianPackageName Microsoft.Guardian.Cli.0.6.0
|
2019-06-20 12:30:36 +00:00
|
|
|
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
|
|
|
|
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
|
|
|
|
${{ parameters.additionalParameters }}
|
|
|
|
displayName: Execute SDL
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|