Skip to content

Commit

Permalink
support track2 codegen in swagger pipeline (#16257)
Browse files Browse the repository at this point in the history
  • Loading branch information
dw511214992 authored Jul 12, 2021
1 parent 3e65811 commit f87dcd2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .scripts/automation_generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
track2-codegen-automation-for-pipeline --inputJsonPath=$1 --outputJsonPath=$2 --use=@autorest/[email protected]
6 changes: 6 additions & 0 deletions .scripts/automation_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
# rush install
npm install -g @microsoft/rush
rush install
# install release tools
npm install -g azure-track2-js-sdk-release-tools
32 changes: 18 additions & 14 deletions swagger_to_sdk_config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/swagger_to_sdk_config.schema.json",
"meta": {
"autorest_options": {
"version": "V2",
"typescript": "",
"license-header": "MICROSOFT_MIT_NO_VERSION",
"sdkrel:typescript-sdks-folder": ".",
"use": "@microsoft.azure/[email protected]"
"advancedOptions": {
"createSdkPullRequests": true,
"generationCallMode": "one-per-config"
},
"initOptions": {
"initScript": {
"path": "sh .scripts/automation_init.sh"
}
},
"generateOptions": {
"generateScript": {
"path": "sh .scripts/automation_generate.sh",
"stderr": {
"showInComment": "^\\[AUTOREST\\]",
"scriptError": "^\\[ERROR\\]",
"scriptWarning": "^\\[WARNING\\]"
}
},
"advanced_options": {
"clone_dir": "./azure-sdk-for-js",
"create_sdk_pull_requests": true,
"sdk_generation_pull_request_base": "integration_branch"
},
"version": "0.2.0"
"parseGenerateOutput": true
}
}

0 comments on commit f87dcd2

Please sign in to comment.