Skip to content

Commit 4772b6e

Browse files
committed
[EngSys] add SDK Automation validation to dev-tool CI
1 parent e437c66 commit 4772b6e

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

common/tools/dev-tool/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
parameters:
2+
- name: SpecCommitId
3+
type: string
4+
default: 'ef166dcba5eca12026b6b0cdebec6b866ea7ca92'
5+
displayName: 'Spec commit id'
6+
- name: TspConfigRelativePath
7+
type: string
8+
default: 'specification/widget/data-plane/WidgetAnalytics/tspconfig.yaml'
9+
displayName: 'Relative path to tspconfig.yaml in spec repo'
110
trigger:
211
branches:
312
include:
@@ -57,3 +66,64 @@ jobs:
5766
- script: |
5867
pnpm --filter @azure/dev-tool... test
5968
displayName: "Run dev-tool unit tests"
69+
70+
- job: 'SDKAutomation'
71+
displayName: 'SDK Automation validation'
72+
73+
variables:
74+
- template: /eng/pipelines/templates/variables/image.yml
75+
- name: NodeVersion
76+
value: '22.13.x'
77+
- name: PythonVersion
78+
value: '3.13'
79+
80+
pool:
81+
name: $(LINUXPOOL)
82+
demands: ImageOverride -equals $(LINUXVMIMAGE)
83+
84+
steps:
85+
- checkout: none
86+
87+
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
88+
parameters:
89+
Paths:
90+
- '/*'
91+
- '!sdk/**/test-recordings/*'
92+
- '!sdk/**/recordings/*'
93+
- '!sdk/**/SessionRecords/*'
94+
- '!sdk/**/session-records/*'
95+
Repositories:
96+
- Name: Azure/azure-rest-api-specs
97+
Commitish: main
98+
WorkingDirectory: $(System.DefaultWorkingDirectory)/azure-rest-api-specs
99+
- Name: Azure/azure-sdk-for-js
100+
Commitish: $(Build.SourceVersion)
101+
WorkingDirectory: $(System.DefaultWorkingDirectory)/azure-sdk-for-js
102+
SkipCheckoutNone: true
103+
104+
- task: NodeTool@0
105+
inputs:
106+
versionSpec: $(NodeVersion)
107+
displayName: 'Install Node.js'
108+
109+
- task: UsePythonVersion@0
110+
inputs:
111+
versionSpec: $(PythonVersion)
112+
113+
- script: |
114+
cd $(System.DefaultWorkingDirectory)/azure-rest-api-specs
115+
echo "##[group]Run npm ci"
116+
npm ci
117+
echo "##[endgroup]"
118+
node $(System.DefaultWorkingDirectory)/azure-rest-api-specs/eng/tools/spec-gen-sdk-runner/cmd/spec-gen-sdk-runner.js \
119+
--scp $(System.DefaultWorkingDirectory)/azure-rest-api-specs \
120+
--sdp $(System.DefaultWorkingDirectory)/azure-sdk-for-js \
121+
--wf $(System.DefaultWorkingDirectory) \
122+
--lang azure-sdk-for-js \
123+
--commit ${{ parameters.SpecCommitId }} \
124+
--spec-repo-url https://github.com/Azure/azure-rest-api-specs \
125+
--tsp-config-relative-path ${{ parameters.TspConfigRelativePath }} \
126+
--api-version 2025-03-21-preview \
127+
--sdk-release-type beta \
128+
--rm local
129+
displayName: 'Generate for template/template SDK'

0 commit comments

Comments
 (0)