Skip to content

Commit 43c2834

Browse files
azure-sdkbenbp
andauthored
Add condition parameter to detect-api-changes template (Azure#44437)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent e5ce3ef commit 43c2834

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eng/common/pipelines/templates/steps/detect-api-changes.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ parameters:
22
ArtifactPath: $(Build.ArtifactStagingDirectory)
33
ArtifactName: 'packages'
44
RepoRoot: $(Build.SourcesDirectory)
5+
Condition: true
56

67
steps:
78
- pwsh: |
89
$apiChangeDetectRequestUrl = "https://apiview.dev/PullRequest/DetectApiChanges"
910
echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl"
1011
displayName: "Set API change detect request URL"
11-
condition: eq(variables['ApiChangeDetectRequestUrl'], '')
12+
condition: and(${{ parameters.Condition}}, eq(variables['ApiChangeDetectRequestUrl'], ''))
1213
1314
- task: Powershell@2
1415
inputs:
@@ -24,4 +25,4 @@ steps:
2425
-DevopsProject $(System.TeamProject)
2526
pwsh: true
2627
displayName: Detect API changes
27-
condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))
28+
condition: and(${{ parameters.Condition }}, succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))

0 commit comments

Comments
 (0)