Skip to content

Commit 3dafe0d

Browse files
Merge pull request #306 from microsoft/dev
Dev
2 parents 8304e45 + 6914970 commit 3dafe0d

File tree

16 files changed

+228
-63
lines changed

16 files changed

+228
-63
lines changed

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"API",
88
"Orchestrator"
99
],
10-
"preLaunchTask": "buildSln",
11-
"stopAll": true
10+
"preLaunchTask": "dotnet: build sln (debug)",
11+
"stopAll": true,
1212
}
1313
],
1414
"configurations": [
@@ -30,7 +30,7 @@
3030
"name": "Orchestrator",
3131
"type": "coreclr",
3232
"request": "attach",
33-
"processId": "${command:azureFunctions.pickProcess}",
33+
"processId": "${command:azureFunctions.pickProcess}"
3434
},
3535
{
3636
"name": "Web",

.vscode/settings.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
"azureFunctions.projectLanguage": "C#",
33
"azureFunctions.projectRuntime": "~4",
44
// "azureFunctions.projectSubpath": "",
5-
"spellright.language": [
6-
"en"
7-
],
8-
"spellright.documentTypes": [
9-
"latex"
10-
],
115
"files.exclude": {
126
"**/.vs": true,
137
"**/bin": true,
@@ -22,5 +16,14 @@
2216
"client/env/include": true,
2317
"client/env/pyvenv.cfg": true,
2418
},
25-
"restructuredtext.confPath": ""
19+
"python.terminal.activateEnvironment": false,
20+
"spellright.language": [
21+
"en"
22+
],
23+
"spellright.documentTypes": [
24+
"latex"
25+
],
26+
"restructuredtext.confPath": "",
27+
"restructuredtext.syntaxHighlighting.disabled": true,
28+
"restructuredtext.languageServer.disabled": true
2629
}

.vscode/tasks.json

Lines changed: 164 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
},
1717
{
18-
"label": "buildSln",
18+
"label": "dotnet: build sln (debug)",
1919
"command": "dotnet",
2020
"args": [
2121
"build",
@@ -24,7 +24,7 @@
2424
"/consoleloggerparameters:NoSummary"
2525
],
2626
"type": "process",
27-
"dependsOn": "cleanSln",
27+
"dependsOn": "dotnet: clean sln",
2828
"group": {
2929
"kind": "build",
3030
"isDefault": true
@@ -39,7 +39,7 @@
3939
}
4040
},
4141
{
42-
"label": "cleanSln",
42+
"label": "dotnet: clean sln",
4343
"command": "dotnet",
4444
"args": [
4545
"clean",
@@ -58,7 +58,81 @@
5858
}
5959
},
6060
{
61-
"label": "startNgrok",
61+
"label": "dotnet: publish API",
62+
"command": "dotnet",
63+
"args": [
64+
"publish",
65+
"${workspaceFolder}/src/TeamCloud.API/TeamCloud.API.csproj",
66+
"-o",
67+
"${workspaceFolder}/src/TeamCloud.API/publish",
68+
"-c",
69+
"Release",
70+
"-p:VersionPrefix=${input:dotnetReleaseVersion}",
71+
"-p:AssemblyVersion=${input:dotnetReleaseVersion}",
72+
"-p:FileVersion=${input:dotnetReleaseVersion}",
73+
"-p:IncludeSymbols=true",
74+
"--no-build"
75+
],
76+
"type": "process",
77+
"problemMatcher": "$msCompile",
78+
"options": {
79+
"cwd": "${workspaceFolder}"
80+
},
81+
"presentation": {
82+
"showReuseMessage": false
83+
}
84+
},
85+
{
86+
"label": "dotnet: publish Orchestrator",
87+
"command": "dotnet",
88+
"args": [
89+
"publish",
90+
"${workspaceFolder}/src/TeamCloud.Orchestrator/TeamCloud.Orchestrator.csproj",
91+
"-o",
92+
"${workspaceFolder}/src/TeamCloud.Orchestrator/publish",
93+
"-c",
94+
"Release",
95+
"-p:VersionPrefix=${input:dotnetReleaseVersion}",
96+
"-p:AssemblyVersion=${input:dotnetReleaseVersion}",
97+
"-p:FileVersion=${input:dotnetReleaseVersion}",
98+
"-p:IncludeSymbols=true",
99+
"--no-build"
100+
],
101+
"type": "process",
102+
"problemMatcher": "$msCompile",
103+
"options": {
104+
"cwd": "${workspaceFolder}"
105+
},
106+
"presentation": {
107+
"showReuseMessage": false
108+
}
109+
},
110+
{
111+
"label": "dotnet: build sln (release)",
112+
"command": "dotnet",
113+
"args": [
114+
"build",
115+
"${workspaceFolder}/src/TeamCloud.sln",
116+
"-c",
117+
"Release",
118+
"-p:VersionPrefix=${input:dotnetReleaseVersion}",
119+
"-p:AssemblyVersion=${input:dotnetReleaseVersion}",
120+
"-p:FileVersion=${input:dotnetReleaseVersion}",
121+
"-p:IncludeSymbols=true"
122+
],
123+
"type": "process",
124+
"dependsOn": "dotnet: clean sln",
125+
"problemMatcher": "$msCompile",
126+
"options": {
127+
"cwd": "${workspaceFolder}/src"
128+
},
129+
"presentation": {
130+
"group": "build",
131+
"showReuseMessage": false
132+
}
133+
},
134+
{
135+
"label": "ngrok: start",
62136
"command": "ngrok",
63137
"args": [
64138
"http",
@@ -73,7 +147,7 @@
73147
"problemMatcher": []
74148
},
75149
{
76-
"label": "setNgrokUrl",
150+
"label": "ngrok: set url",
77151
"command": "python3",
78152
"args": [
79153
"scripts/get-url.py"
@@ -82,7 +156,7 @@
82156
"problemMatcher": []
83157
},
84158
{
85-
"label": "npmStart",
159+
"label": "npm: start",
86160
"command": "npm",
87161
"args": [
88162
"start"
@@ -96,7 +170,7 @@
96170
"cwd": "${workspaceFolder}/web"
97171
},
98172
"dependsOn": [
99-
"setNgrokUrl"
173+
"ngrok: set url"
100174
]
101175
},
102176
{
@@ -183,6 +257,83 @@
183257
"-n",
184258
"teamcloud"
185259
]
260+
},
261+
{
262+
"label": "cli: setup azdev",
263+
"type": "shell",
264+
"command": "source client/env/bin/activate; azdev setup -r ${workspaceFolder} -e tc",
265+
"options": {
266+
"cwd": "${workspaceFolder}"
267+
},
268+
"presentation": {
269+
"showReuseMessage": false,
270+
},
271+
"dependsOrder": "sequence",
272+
"dependsOn": [
273+
"cli: create venv",
274+
"cli: install azdev"
275+
],
276+
"problemMatcher": []
277+
},
278+
{
279+
"label": "cli: install azdev",
280+
"type": "shell",
281+
"command": "source client/env/bin/activate; pip3 install azdev",
282+
"options": {
283+
"cwd": "${workspaceFolder}"
284+
},
285+
"presentation": {
286+
"showReuseMessage": false,
287+
}
288+
},
289+
{
290+
"label": "cli: create venv",
291+
"type": "shell",
292+
"command": "python3",
293+
"args": [
294+
"-m",
295+
"venv",
296+
"env"
297+
],
298+
"options": {
299+
"cwd": "${workspaceFolder}/client"
300+
},
301+
"presentation": {
302+
"showReuseMessage": false,
303+
}
304+
},
305+
{
306+
"label": "cli: delete env",
307+
"type": "shell",
308+
"command": "rm",
309+
"args": [
310+
"-r",
311+
"env"
312+
],
313+
"options": {
314+
"cwd": "${workspaceFolder}/client"
315+
},
316+
"presentation": {
317+
"showReuseMessage": false,
318+
},
319+
"problemMatcher": []
320+
},
321+
{
322+
"label": "func: delete task hub",
323+
"command": "func",
324+
"args": [
325+
"durable",
326+
"delete-task-hub",
327+
"--connection-string-setting",
328+
"DurableFunctionsHubStorage"
329+
],
330+
"options": {
331+
"cwd": "${workspaceFolder}/src/TeamCloud.Orchestrator"
332+
},
333+
"presentation": {
334+
"showReuseMessage": false,
335+
},
336+
"problemMatcher": []
186337
}
187338
],
188339
"inputs": [
@@ -192,6 +343,12 @@
192343
"description": "Version for this tag (also builds a latest version).",
193344
"default": "0.0.0"
194345
},
346+
{
347+
"id": "dotnetReleaseVersion",
348+
"type": "promptString",
349+
"description": "Version for this release.",
350+
"default": "1.0.0"
351+
},
195352
{
196353
"id": "imageName",
197354
"type": "pickString",

client/tc/azext_tc/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def deployment_scope_create(cmd, client, base_url, org, scope, scope_type='Azure
205205

206206
parameters = json.loads(json.dumps(parameters))
207207

208-
payload = DeploymentScopeDefinition(display_name=scope, type=scope_type, input_date=parameters)
208+
payload = DeploymentScopeDefinition(display_name=scope, type=scope_type, input_data=parameters)
209209

210210
return _create(cmd, client, base_url, client.create_deployment_scope, payload, org=org)
211211

src/TeamCloud.API/Program.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
*/
55

66
using System.Threading.Tasks;
7+
using Azure.Identity;
78
using Microsoft.AspNetCore.Hosting;
8-
using Microsoft.Azure.KeyVault;
9-
using Microsoft.Azure.Services.AppAuthentication;
109
using Microsoft.Extensions.Configuration;
11-
using Microsoft.Extensions.Configuration.AzureKeyVault;
1210
using Microsoft.Extensions.Hosting;
1311
using TeamCloud.Configuration;
12+
using System;
1413

1514
namespace TeamCloud.API;
1615

@@ -45,11 +44,7 @@ private static void ConfigureEnvironment(IHostEnvironment hostingEnvironment, IC
4544
{
4645
// we use the managed identity of the service to authenticate at the KeyVault
4746

48-
var azureServiceTokenProvider = new AzureServiceTokenProvider();
49-
50-
using var keyVaultClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
51-
52-
configurationBuilder.AddAzureKeyVault($"https://{keyVaultName}.vault.azure.net/", keyVaultClient, new DefaultKeyVaultSecretManager());
47+
configurationBuilder.AddAzureKeyVault(new Uri($"https://{keyVaultName}.vault.azure.net/"), new DefaultAzureCredential());
5348
}
5449
else if (hostingEnvironment.IsDevelopment())
5550
{

src/TeamCloud.API/TeamCloud.API.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17+
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.2.1" />
1718
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.2.1" />
1819
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Keys" Version="1.1.0" />
1920
<PackageReference Include="FluentValidation" Version="9.2.2" />
@@ -28,7 +29,6 @@
2829
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="4.5.1" />
2930
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
3031
<PackageReference Include="Microsoft.Extensions.Caching.Cosmos" Version="1.1.0" />
31-
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.22" />
3232
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
3333
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
3434
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.0" />

src/TeamCloud.Adapters.AzureDevOps/TeamCloud.Adapters.AzureDevOps.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />
2424
<PackageReference Include="Microsoft.VisualStudio.Services.MemberEntitlementManagement.WebApi" Version="16.170.0" />
2525
<PackageReference Include="Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi" Version="16.170.0" />
26-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.15.0" />
26+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.15.1" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

0 commit comments

Comments
 (0)