Skip to content

Commit ea4d845

Browse files
committed
enable ApiView change detection
1 parent 4702382 commit ea4d845

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

common/tools/dev-tool/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
value: $(NODE_VERSION_LTS_MAINTENANCE)
7878
- name: PythonVersion
7979
value: '3.13'
80+
- name: PipelineArtifactsName
81+
value: 'packages'
8082

8183
pool:
8284
name: $(LINUXPOOL)
@@ -127,3 +129,28 @@ jobs:
127129
--sdk-release-type beta \
128130
--rm local
129131
displayName: 'Generate SDK'
132+
133+
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
134+
parameters:
135+
ArtifactName: $(SpecGenSdkArtifactName)
136+
ArtifactPath: "$(System.DefaultWorkingDirectory)/$(SpecGenSdkArtifactPath)"
137+
CustomCondition: and(succeededOrFailed(), ne(variables['SpecGenSdkArtifactName'], ''))
138+
139+
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
140+
parameters:
141+
ArtifactName: $(PipelineArtifactsName)
142+
ArtifactPath: $(StagedArtifactsFolder)
143+
CustomCondition: and(succeededOrFailed(), ne(variables['StagedArtifactsFolder'], ''))
144+
145+
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
146+
- pwsh: |
147+
. $(SpecRepoDirectory)/eng/common/scripts/Helpers/ApiView-Helpers.ps1
148+
Create-API-Review `
149+
-specGenSDKArtifactPath "$(System.DefaultWorkingDirectory)/$(SpecGenSdkArtifactPath)/$(SpecGenSdkArtifactName).json" `
150+
-apiviewArtifactName "$(PipelineArtifactsName)" `
151+
-buildId "$(Build.BuildId)" `
152+
-commitish "$(System.PullRequest.SourceCommitId)" `
153+
-repoName "Azure/azure-sdk-for-js" `
154+
-pullRequestNumber "$(System.PullRequest.PullRequestNumber)"
155+
displayName: 'Detect API Change and Create API Review'
156+
condition: and(succeeded(), eq(variables['HasAPIViewArtifact'], 'true'))

0 commit comments

Comments
 (0)