Skip to content

Commit 60cd4db

Browse files
bfoley13Brandon Foley
andauthored
[Hub Generated] Publish private branch 'brfole/devhub-spec' (#19335)
* Adding new DeveloperHub RP * Adding OIDCCreds into Workflow defintiion * Adding pagination and workflow run fields * File rename and prettier * Updating for Lint/Model validation * Fix Error Definition * More Lint/Service changes * Validation passing locally * DeffChecks * fixing operations definitions * Update readme * Adding pullNumber * addressing some comments * Updating ACR and GitHubToken * Updating parameter requirements * GitHub auth changes * updating examples * misplaced example field fix * Adding proxied location resource * updating authurl in example to match spec * Adding redirectUrl paramater and addressing delete comment * Adding 200 Response for delete * Wrap response in schema * more cleanup * Updating GitHubOAuth Post * missed the param rename * no required allowed * parameter spec * updating spec with singleton approach * Prettier fix * swapping out params for common types * Reverting tags * prettier checks * remove codegen Co-authored-by: Brandon Foley <brfole@microsoft.com>
1 parent 669c279 commit 60cd4db

File tree

13 files changed

+1443
-0
lines changed

13 files changed

+1443
-0
lines changed

custom-words.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ GIFs
849849
Gilbertese
850850
githubusercontent
851851
gitrepo
852+
githuboauth
853+
githuboauthcallback
852854
globalconfiguration
853855
Gloo
854856
gltf
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subscriptionId1",
4+
"location": "eastus2euap",
5+
"api-version": "2022-04-01-preview",
6+
"parameters": {
7+
"redirectUrl": "https://ms.portal.azure.com/aks"
8+
}
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"authURL": "https://github.com/login/oauth/authorize?client_id=11111111&redirect_uri=https://management.azure.com/subscriptions/subscriptionId1/providers/Microsoft.DevHub/locations/eastus2euap/githuboauth&state=2345678-3456-7890-5678-012345678901&scope=repo,user:email,workflow",
14+
"token": ""
15+
}
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subscriptionId1",
4+
"location": "eastus2euap",
5+
"api-version": "2022-04-01-preview",
6+
"code": "3584d83530557fdd1f46af8289938c8ef79f9dc5",
7+
"state": "12345678-3456-7890-5678-012345678901"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"id": "/subscriptions/subscriptionId1/providers/Microsoft.DevHub/locations/eastus2euap/githuboauth/default",
13+
"type": "Microsoft.DevHub/locations/githuboauth",
14+
"name": "default",
15+
"properties": {
16+
"username": "user"
17+
}
18+
}
19+
}
20+
}
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "subscriptionId1",
4+
"location": "eastus2euap",
5+
"api-version": "2022-04-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/subscriptionId1/providers/Microsoft.DevHub/locations/eastus2euap/githuboauth/default",
13+
"type": "Microsoft.DevHub/locations/githuboauth",
14+
"name": "default",
15+
"properties": {
16+
"username": "user"
17+
}
18+
}
19+
]
20+
}
21+
}
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-04-01-preview"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "Microsoft.DevHub/workflows/read",
11+
"display": {
12+
"provider": "Microsoft Developer Hub",
13+
"resource": "Workflows",
14+
"operation": "Get workflow",
15+
"description": "Gets workflow"
16+
}
17+
}
18+
],
19+
"nextLink": null
20+
}
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-04-01-preview",
4+
"subscriptionId": "subscriptionId1",
5+
"resourceGroupName": "resourceGroup1",
6+
"workflowName": "workflow1",
7+
"parameters": {
8+
"location": "location1",
9+
"tags": {
10+
"appname": "testApp"
11+
},
12+
"properties": {
13+
"githubWorkflowProfile": {
14+
"repositoryOwner": "owner1",
15+
"repositoryName": "repo1",
16+
"branchName": "branch1",
17+
"dockerfile": "repo1/images/Dockerfile",
18+
"dockerBuildContext": "repo1/src/",
19+
"deploymentProperties": {
20+
"manifestType": "kube",
21+
"kubeManifestLocations": [
22+
"/src/manifests/"
23+
],
24+
"overrides": {
25+
"key1": "value1"
26+
}
27+
},
28+
"acr": {
29+
"acrSubscriptionId": "subscriptionId1",
30+
"acrResourceGroup": "resourceGroup1",
31+
"acrRegistryName": "registry1",
32+
"acrRepositoryName": "repo1"
33+
},
34+
"oidcCredentials": {
35+
"azureClientId": "12345678-3456-7890-5678-012345678901",
36+
"azureTenantId": "66666666-3456-7890-5678-012345678901"
37+
},
38+
"aksResourceId": "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"
39+
}
40+
}
41+
}
42+
},
43+
"responses": {
44+
"200": {
45+
"body": {
46+
"id": "/subscription/subscriptionId1/resourceGroups/resourceGroup1/providers/Microsoft.DevHub/workflow/workflow1",
47+
"location": "location1",
48+
"name": "workflow1",
49+
"type": "Micfosoft.DevHub/Workflow",
50+
"tags": {
51+
"appname": "testapp"
52+
},
53+
"systemData": {
54+
"createdBy": "foo@contoso.com",
55+
"createdByType": "User",
56+
"createdAt": "2018-04-24T16:30:55+00:00",
57+
"lastModifiedBy": "foo@contoso.com",
58+
"lastModifiedByType": "User",
59+
"lastModifiedAt": "2018-04-24T16:30:55+00:00"
60+
},
61+
"properties": {
62+
"githubWorkflowProfile": {
63+
"repositoryOwner": "owner1",
64+
"repositoryName": "repo2",
65+
"branchName": "branch2",
66+
"dockerfile": "repo2/images/Dockerfile",
67+
"dockerBuildContext": "repo2/src/",
68+
"deploymentProperties": {
69+
"manifestType": "helm",
70+
"helmChartPath": "/src/charts",
71+
"helmValues": "/src/chars/values.yaml",
72+
"overrides": {
73+
"key1": "value1"
74+
}
75+
},
76+
"acr": {
77+
"acrSubscriptionId": "subscriptionId1",
78+
"acrResourceGroup": "resourceGroup1",
79+
"acrRegistryName": "registry1",
80+
"acrRepositoryName": "repo1"
81+
},
82+
"oidcCredentials": {
83+
"azureClientId": "12345678-3456-7890-5678-012345678901",
84+
"azureTenantId": "66666666-3456-7890-5678-012345678901"
85+
},
86+
"aksResourceId": "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
87+
"prURL": "https://github.com/User/repo2/pull/6567",
88+
"pullNumber": 6567,
89+
"prStatus": "submitted",
90+
"authStatus": "Authorized"
91+
}
92+
}
93+
}
94+
},
95+
"201": {
96+
"body": {
97+
"id": "/subscription/subscriptionId1/resourceGroups/resourceGroup1/providers/Microsoft.DevHub/workflow/workflow1",
98+
"location": "location1",
99+
"name": "workflow1",
100+
"type": "Micfosoft.DevHub/Workflow",
101+
"tags": {
102+
"appname": "testapp"
103+
},
104+
"systemData": {
105+
"createdBy": "foo@contoso.com",
106+
"createdByType": "User",
107+
"createdAt": "2018-04-24T16:30:55+00:00",
108+
"lastModifiedBy": "foo@contoso.com",
109+
"lastModifiedByType": "User",
110+
"lastModifiedAt": "2018-04-24T16:30:55+00:00"
111+
},
112+
"properties": {
113+
"githubWorkflowProfile": {
114+
"repositoryOwner": "owner1",
115+
"repositoryName": "repo1",
116+
"branchName": "branch1",
117+
"dockerfile": "repo1/images/Dockerfile",
118+
"dockerBuildContext": "repo1/src/",
119+
"deploymentProperties": {
120+
"manifestType": "kube",
121+
"overrides": {
122+
"key1": "value1"
123+
}
124+
},
125+
"acr": {
126+
"acrSubscriptionId": "subscriptionId1",
127+
"acrResourceGroup": "resourceGroup1",
128+
"acrRegistryName": "registry1",
129+
"acrRepositoryName": "repo1"
130+
},
131+
"oidcCredentials": {
132+
"azureClientId": "12345678-3456-7890-5678-012345678901",
133+
"azureTenantId": "66666666-3456-7890-5678-012345678901"
134+
},
135+
"aksResourceId": "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
136+
"prURL": "https://github.com/owner1/repo1/pull/6567",
137+
"pullNumber": 6567,
138+
"prStatus": "submitted",
139+
"authStatus": "Authorized"
140+
}
141+
}
142+
}
143+
}
144+
}
145+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-04-01-preview",
4+
"subscriptionId": "subscriptionId1",
5+
"resourceGroupName": "resourceGroup1",
6+
"workflowName": "workflow1"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"status": "workflow deleted successfully"
12+
}
13+
},
14+
"204": {}
15+
}
16+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-04-01-preview",
4+
"subscriptionId": "subscriptionId1",
5+
"resourceGroupName": "resourceGroup1",
6+
"workflowName": "workflow1"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscription/subscriptionId1/resourceGroups/resourceGroup1/providers/Microsoft.DevHub/workflow/workflow1",
12+
"location": "location1",
13+
"name": "workflow1",
14+
"type": "Micfosoft.DevHub/Workflow",
15+
"tags": {
16+
"appname": "testapp"
17+
},
18+
"systemData": {
19+
"createdBy": "foo@contoso.com",
20+
"createdByType": "User",
21+
"createdAt": "2018-04-24T16:30:55+00:00",
22+
"lastModifiedBy": "foo@contoso.com",
23+
"lastModifiedByType": "User",
24+
"lastModifiedAt": "2018-04-24T16:30:55+00:00"
25+
},
26+
"properties": {
27+
"githubWorkflowProfile": {
28+
"repositoryOwner": "owner1",
29+
"repositoryName": "repo1",
30+
"branchName": "branch1",
31+
"dockerfile": "repo1/images/Dockerfile",
32+
"dockerBuildContext": "repo1/src/",
33+
"deploymentProperties": {
34+
"manifestType": "kube",
35+
"overrides": {
36+
"key1": "value1"
37+
}
38+
},
39+
"acr": {
40+
"acrSubscriptionId": "subscriptionId1",
41+
"acrResourceGroup": "resourceGroup1",
42+
"acrRegistryName": "registry1",
43+
"acrRepositoryName": "repo1"
44+
},
45+
"oidcCredentials": {
46+
"azureClientId": "12345678-3456-7890-5678-012345678901",
47+
"azureTenantId": "66666666-3456-7890-5678-012345678901"
48+
},
49+
"aksResourceId": "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
50+
"prURL": "https://github.com/User/repo1/pull/6567",
51+
"pullNumber": 6567,
52+
"prStatus": "merged",
53+
"lastWorkflowRun": {
54+
"succeeded": true,
55+
"workflowRunURL": "https://github.com/User/repo1/actions/runs/1820640230",
56+
"lastRunAt": "2019-01-01T12:34:56.000Z"
57+
},
58+
"authStatus": "Authorized"
59+
}
60+
}
61+
}
62+
}
63+
}
64+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-04-01-preview",
4+
"subscriptionId": "subscriptionId1"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/subscription/subscriptionId1/resourceGroups/resourceGroup1/providers/Microsoft.DevHub/workflow/workflow1",
12+
"location": "location1",
13+
"name": "workflow1",
14+
"type": "Micfosoft.DevHub/Workflow",
15+
"tags": {
16+
"appname": "testapp"
17+
},
18+
"systemData": {
19+
"createdBy": "foo@contoso.com",
20+
"createdByType": "User",
21+
"createdAt": "2018-04-24T16:30:55+00:00",
22+
"lastModifiedBy": "foo@contoso.com",
23+
"lastModifiedByType": "User",
24+
"lastModifiedAt": "2018-04-24T16:30:55+00:00"
25+
},
26+
"properties": {
27+
"githubWorkflowProfile": {
28+
"repositoryOwner": "owner1",
29+
"repositoryName": "repo1",
30+
"branchName": "branch1",
31+
"dockerfile": "repo1/images/Dockerfile",
32+
"dockerBuildContext": "repo1/src/",
33+
"deploymentProperties": {
34+
"manifestType": "kube",
35+
"overrides": {
36+
"key1": "value1"
37+
}
38+
},
39+
"acr": {
40+
"acrSubscriptionId": "subscriptionId1",
41+
"acrResourceGroup": "resourceGroup1",
42+
"acrRegistryName": "registry1",
43+
"acrRepositoryName": "repo1"
44+
},
45+
"oidcCredentials": {
46+
"azureClientId": "12345678-3456-7890-5678-012345678901",
47+
"azureTenantId": "66666666-3456-7890-5678-012345678901"
48+
},
49+
"aksResourceId": "/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1",
50+
"prURL": "https://github.com/User/repo1/pull/6567",
51+
"pullNumber": 6567,
52+
"prStatus": "submitted",
53+
"authStatus": "Authorized"
54+
}
55+
}
56+
}
57+
],
58+
"nextLink": "https://management.azure.com:443/subscriptions/subscriptionId1/providers/Microsoft.DevHub/workflows?api-version=2018-05-05-preview&timeRange=1&$skipToken="
59+
}
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)