Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
30 changes: 26 additions & 4 deletions eng/mgmt/automation/generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ variables:
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
- name: NodeVersion
value: '16.x'
value: '18.x'
- name: fromTypeSpec
value: $[ne(variables['TSP_CONFIG'], '')]

steps:
- bash: |
Expand All @@ -29,6 +31,12 @@ steps:
- bash: |
npm install -g autorest
displayName: 'Install autorest'
condition: eq(variables.fromTypeSpec, false)

- bash: |
npm install -g @azure-tools/typespec-client-generator-cli
displayName: 'Install tsp-client'
condition: eq(variables.fromTypeSpec, true)

# - template: /eng/common/testproxy/test-proxy-tool.yml
# parameters:
Expand All @@ -38,13 +46,27 @@ steps:
- bash: |
export PATH=$JAVA_HOME_11_X64/bin:$PATH
java -version
set -x
./eng/mgmt/automation/generate.py --tsp-config "$(TSP_CONFIG)" --version "$(VERSION)" --auto-commit-external-change --user-name "azure-sdk" --user-email "azuresdk@microsoft.com"
displayName: Generation from TypeSpec
condition: eq(variables.fromTypeSpec, true)

- bash: |
export PATH=$JAVA_HOME_11_X64/bin:$PATH
java -version
set -x
./eng/mgmt/automation/generate.py --readme "$(README)" --tag "$(TAG)" --autorest-options="$(AUTOREST_OPTIONS)" --service "$(SERVICE)" --version "$(VERSION)" --suffix "$(SUFFIX)" --auto-commit-external-change --user-name "azure-sdk" --user-email "azuresdk@microsoft.com"
displayName: Generation
displayName: Generation from Swagger
condition: eq(variables.fromTypeSpec, false)

- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
parameters:
PRBranchName: fluent-lite-generation-$(Build.BuildId)
CommitMsg: '[Automation] Generate Fluent Lite from $(README)#$(TAG)'
PRTitle: '[Automation] Generate Fluent Lite from $(README)#$(TAG)'
${{ if variables.fromTypeSpec }}:
CommitMsg: '[Automation] Generate Fluent Lite from TypeSpec $(README)'
PRTitle: '[Automation] Generate Fluent Lite from TypeSpec $(README)'
${{ else }}:
CommitMsg: '[Automation] Generate Fluent Lite from Swagger $(README)#$(TAG)'
PRTitle: '[Automation] Generate Fluent Lite from Swagger $(README)#$(TAG)'
PRLabels: 'Mgmt - Track 2'
OpenAsDraft: '$(DRAFT_PULL_REQUEST)'
2 changes: 1 addition & 1 deletion eng/mgmt/automation/generation_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variables:
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
- name: NodeVersion
value: '16.x'
value: '18.x'

steps:
- bash: |
Expand Down