Skip to content

Commit c8bf607

Browse files
Merge branch 'master' into master
2 parents 711b76e + dc37de8 commit c8bf607

File tree

6 files changed

+348
-19
lines changed

6 files changed

+348
-19
lines changed

generator/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ View the Pipeline Configuration [here](/azure-pipelines-autogen.yml).
3131
2. Create a Pull Request from [`autogenerate`](https://github.com/Azure/azure-resource-manager-schemas/tree/autogenerate) to [`master`](https://github.com/Azure/azure-resource-manager-schemas/tree/master).
3232
3. If there are any modifications to [schemas/common/autogeneratedResources.json](/schemas/common/autogeneratedResources.json), push a commit to the autogenerate branch to make any corresponding changes to [schemas/2014-04-01-preview/deploymentTemplate.json](/schemas/2014-04-01-preview/deploymentTemplate.json) and [schemas/2015-01-01/deploymentTemplate.json](/schemas/2015-01-01/deploymentTemplate.json).
3333

34-
#### Onboarding teams to autogeneration pipeline
35-
36-
1. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
37-
1. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
38-
1. Remove all references to the provider namespace from [schemas/2019-04-01/deploymentTemplate.json](/schemas/2019-04-01/deploymentTemplate.json).
39-
1. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
40-
1. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include the full output saved in step 2 as a comment.
41-
1. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources have been detected and generated as expected.
34+
#### Onboarding to the autogeneration pipeline
35+
36+
1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the `generator` directory.
37+
3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
38+
4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
39+
5. Manually remove any existing references to your provider namespace (if any) from [schemas/2019-04-01/deploymentTemplate.json](/schemas/2019-04-01/deploymentTemplate.json).
40+
6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
41+
7. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include the full output saved in step 2 as a comment.
42+
8. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources have been detected and generated as expected.

generator/autogenlist.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,10 @@ const autoGenList: AutoGenConfig[] = [
786786
{
787787
basePath: 'web/resource-manager',
788788
namespace: 'Microsoft.Web'
789+
},
790+
{
791+
basePath: 'deviceupdate/resource-manager',
792+
namespace: 'Microsoft.DeviceUpdate',
789793
}
790794
];
791795

generator/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function handleGeneratedSchema(readme: string, schemaPath: string, autoGen
100100
}
101101

102102
async function execAutoRest(tmpFolder: string, params: string[]) {
103-
await executeCmd(__dirname, autorestBinary, params);
103+
await executeCmd(__dirname, `${__dirname}/node_modules/.bin/${autorestBinary}`, params);
104104
if (!await fileExists(tmpFolder)) {
105105
return [];
106106
}

onboarded-report/result.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,8 @@
117117
},
118118
{
119119
"basePath": "azurearcdata/resource-manager",
120-
"onboardedToAutogen": "no",
121-
"missing": [
122-
"Microsoft.AzureArcData"
123-
],
120+
"onboardedToAutogen": "yes",
121+
"missing": [],
124122
"onboarded": []
125123
},
126124
{
@@ -157,12 +155,6 @@
157155
"missing": [],
158156
"onboarded": []
159157
},
160-
{
161-
"basePath": "batchai/resource-manager",
162-
"onboardedToAutogen": "yes",
163-
"missing": [],
164-
"onboarded": []
165-
},
166158
{
167159
"basePath": "billing/resource-manager",
168160
"onboardedToAutogen": "yes",
@@ -906,6 +898,14 @@
906898
"missing": [],
907899
"onboarded": []
908900
},
901+
{
902+
"basePath": "quota/resource-manager",
903+
"onboardedToAutogen": "no",
904+
"missing": [
905+
"Microsoft.Quota"
906+
],
907+
"onboarded": []
908+
},
909909
{
910910
"basePath": "recoveryservices/resource-manager",
911911
"onboardedToAutogen": "yes",

0 commit comments

Comments
 (0)