Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions eng/common/pipelines/templates/steps/create-apireview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ parameters:
GenerateApiReviewForManualOnly: false
ArtifactName: 'packages'
PackageName: ''
SourceRootPath: $(Build.SourcesDirectory)

steps:
# ideally this should be done as initial step of a job in caller template
# We can remove this step later once it is added in caller
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
parameters:
WorkingDirectory: ${{parameters.SourceRootPath}}

# Automatic API review is generated for a package when pipeline runs irrespective of how pipeline gets triggered.
# Below condition ensures that API review is generated only for manual pipeline runs when flag GenerateApiReviewForManualOnly is set to true.
- ${{ if or(ne(parameters.GenerateApiReviewForManualOnly, true), eq(variables['Build.Reason'], 'Manual')) }}:
- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Create-APIReview.ps1
filePath: ./eng/common/scripts/Create-APIReview.ps1
arguments: >
-ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name)
-ArtifactPath ${{parameters.ArtifactPath}}
Expand All @@ -31,7 +34,7 @@ steps:
-RepoName '$(Build.Repository.Name)'
-MarkPackageAsShipped $${{parameters.MarkPackageAsShipped}}
pwsh: true
workingDirectory: $(Pipeline.Workspace)
workingDirectory: ${{parameters.SourceRootPath}}
displayName: Create API Review
condition: >-
and(
Expand Down