Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin authored Jun 18, 2021
2 parents 711b76e + dc37de8 commit c8bf607
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 19 deletions.
17 changes: 9 additions & 8 deletions generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ View the Pipeline Configuration [here](/azure-pipelines-autogen.yml).
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).
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).

#### Onboarding teams to autogeneration pipeline

1. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
1. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
1. Remove all references to the provider namespace from [schemas/2019-04-01/deploymentTemplate.json](/schemas/2019-04-01/deploymentTemplate.json).
1. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
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.
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.
#### Onboarding to the autogeneration pipeline

1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the `generator` directory.
3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
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).
6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
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.
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.
4 changes: 4 additions & 0 deletions generator/autogenlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,10 @@ const autoGenList: AutoGenConfig[] = [
{
basePath: 'web/resource-manager',
namespace: 'Microsoft.Web'
},
{
basePath: 'deviceupdate/resource-manager',
namespace: 'Microsoft.DeviceUpdate',
}
];

Expand Down
2 changes: 1 addition & 1 deletion generator/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function handleGeneratedSchema(readme: string, schemaPath: string, autoGen
}

async function execAutoRest(tmpFolder: string, params: string[]) {
await executeCmd(__dirname, autorestBinary, params);
await executeCmd(__dirname, `${__dirname}/node_modules/.bin/${autorestBinary}`, params);
if (!await fileExists(tmpFolder)) {
return [];
}
Expand Down
20 changes: 10 additions & 10 deletions onboarded-report/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@
},
{
"basePath": "azurearcdata/resource-manager",
"onboardedToAutogen": "no",
"missing": [
"Microsoft.AzureArcData"
],
"onboardedToAutogen": "yes",
"missing": [],
"onboarded": []
},
{
Expand Down Expand Up @@ -157,12 +155,6 @@
"missing": [],
"onboarded": []
},
{
"basePath": "batchai/resource-manager",
"onboardedToAutogen": "yes",
"missing": [],
"onboarded": []
},
{
"basePath": "billing/resource-manager",
"onboardedToAutogen": "yes",
Expand Down Expand Up @@ -906,6 +898,14 @@
"missing": [],
"onboarded": []
},
{
"basePath": "quota/resource-manager",
"onboardedToAutogen": "no",
"missing": [
"Microsoft.Quota"
],
"onboarded": []
},
{
"basePath": "recoveryservices/resource-manager",
"onboardedToAutogen": "yes",
Expand Down
Loading

0 comments on commit c8bf607

Please sign in to comment.