Skip to content

Commit d3356f8

Browse files
authored
Sync eng/common directory with azure-sdk-tools for PR 2875 (Azure#27390)
* Support staging URl to run detect API changes in test env
1 parent b58a2ef commit d3356f8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ parameters:
33
Artifacts: []
44

55
steps:
6+
- pwsh: |
7+
$apiChangeDetectRequestUrl = "https://apiview.dev/PullRequest/DetectApiChanges"
8+
echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl"
9+
displayName: "Set API change detect request URL"
10+
condition: eq(variables['ApiChangeDetectRequestUrl'], '')
11+
612
- task: Powershell@2
713
inputs:
814
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Detect-Api-Changes.ps1
@@ -13,6 +19,7 @@ steps:
1319
-BuildId $(Build.BuildId)
1420
-PullRequestNumber $(System.PullRequest.PullRequestNumber)
1521
-RepoFullName $(Build.Repository.Name)
22+
-APIViewUri $(ApiChangeDetectRequestUrl)
1623
pwsh: true
1724
displayName: Detect API changes
1825
condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))

eng/common/scripts/Detect-Api-Changes.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Param (
1010
[string] $CommitSha,
1111
[Parameter(Mandatory=$True)]
1212
[array] $ArtifactList,
13+
[string] $APIViewUri,
1314
[string] $RepoFullName = "",
1415
[string] $ArtifactName = "packages",
15-
[string] $APIViewUri = "https://apiview.dev/PullRequest/DetectApiChanges",
1616
[string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/")
1717
)
1818

0 commit comments

Comments
 (0)