Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 4ff6a98

Browse files
Merge pull request #35 from microsoft/aksh/validations
Repository import
2 parents 84f268e + bfd570c commit 4ff6a98

129 files changed

Lines changed: 1307 additions & 2068 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/ADOGenerator/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@
112112
.ExecuteAsync();
113113
accessToken = result.AccessToken;
114114
}
115-
catch (MsalUiRequiredException)
115+
catch (Exception ex)
116116
{
117117
var result = await authService.AcquireTokenAsync(app);
118118
accessToken = result.AccessToken;
119+
id.ErrorId().AddMessage($"Error: {ex.Message}");
119120
}
120121
}
121122
else
@@ -263,6 +264,10 @@ bool ValidateExtensions(string templateFolderPath, string id)
263264
}
264265

265266
var extensionsFile = File.ReadAllText(extensionsFilePath);
267+
if(string.IsNullOrEmpty(extensionsFile))
268+
{
269+
return false;
270+
}
266271
var extensionjson = JObject.Parse(extensionsFile);
267272
var extensions = extensionjson["Extensions"];
268273
if (extensions == null)

src/ADOGenerator/ServiceExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public static void AddMessage(this string id, string message)
4040
string fileName = $"{DateTime.Now.ToString("yyyy-MM-dd")}-{id}.txt";
4141
if (id.EndsWith("_Errors"))
4242
{
43+
// Create Errors Log Directory if not exists
44+
if (!Directory.Exists(Path.Combine(logFilePath, "Errors")))
45+
{
46+
Directory.CreateDirectory(Path.Combine(logFilePath, "Errors"));
47+
}
4348
// Create Log file
4449
if (!File.Exists(Path.Combine(logFilePath, "Errors", fileName)))
4550
{

src/ADOGenerator/Templates/MSL-Create-Build-Pipeline/ImportSourceCode/GitRepository.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/ADOGenerator/Templates/MSL-Create-Build-Pipeline/ImportSourceCode/Space Game - web.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parameters": {
3+
"gitSource": {
4+
"url": "https://github.com/jamcneil/mslearn-tailspin-spacegame-web",
5+
"branch": "main"
6+
},
7+
"serviceEndpointId": "$mslearn-tailspin-spacegame-web-code$",
8+
"deleteServiceEndpointAfterImportIsDone": true
9+
}
10+
}

src/ADOGenerator/Templates/MSL-Create-Build-Pipeline/ServiceEndpoints/Space Game - web-code.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/ADOGenerator/Templates/MSL-SpaceGame-DeliveryPlans/ServiceEndpoints/Space Game - web-code.json renamed to src/ADOGenerator/Templates/MSL-Create-Build-Pipeline/ServiceEndpoints/mslearn-tailspin-spacegame-web.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
"name": "Space Game - web-code",
66
"type": "git",
7-
"url": "https://dev.azure.com/sharplogic/Space Game/_git/Space Game - web",
7+
"url": "https://github.com/jamcneil/mslearn-tailspin-spacegame-web",
88
"authorization": {
99
"scheme": "UsernamePassword",
1010
"parameters": {

src/ADOGenerator/Templates/MSL-Deploy-Docker-Template/BuildDefinitionGitHub/mslearn-tailspin-spacegame-web-deploy.json

Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"triggers": [
3+
{
4+
"branchFilters": [],
5+
"pathFilters": [],
6+
"settingsSourceType": 2,
7+
"batchChanges": false,
8+
"maxConcurrentBuildsPerBranch": 1,
9+
"triggerType": "continuousIntegration"
10+
}
11+
],
12+
"properties": {},
13+
"tags": [],
14+
"_links": "{}",
15+
"jobAuthorizationScope": "projectCollection",
16+
"jobTimeoutInMinutes": 60,
17+
"jobCancelTimeoutInMinutes": 5,
18+
"badgeEnabled": true,
19+
"process": {
20+
"yamlFilename": "azure-pipelines.yml",
21+
"type": 2
22+
},
23+
"repository": {
24+
"properties": {
25+
"cloneUrl": "https://$Organization$@dev.azure.com/$Organization$/$ProjectName$/_git/mslearn-tailspin-spacegame-web-docker",
26+
"fullName": "mslearn-tailspin-spacegame-web-docker",
27+
"defaultBranch": "refs/heads/main",
28+
"isFork": "False",
29+
"safeRepository": "$mslearn-tailspin-spacegame-web-docker$",
30+
"reportBuildStatus": "true",
31+
"fetchDepth": "1"
32+
},
33+
34+
"id": "$mslearn-tailspin-spacegame-web-docker$",
35+
"type": "TfsGit",
36+
"name": "mslearn-tailspin-spacegame-web-docker",
37+
"url": "https://$Organization$@dev.azure.com/$Organization$/$ProjectName$/_git/mslearn-tailspin-spacegame-web-docker",
38+
"defaultBranch": "refs/heads/main",
39+
"clean": null,
40+
"checkoutSubmodules": false
41+
},
42+
"quality": "definition",
43+
"authoredBy": "{}",
44+
"drafts": [],
45+
"id": "",
46+
"name": "mslearn-tailspin-spacegame-web-docker",
47+
"url": "",
48+
"uri": "",
49+
"path": "\\",
50+
"type": "build",
51+
"queueStatus": "enabled",
52+
"revision": 1,
53+
"createdDate": "",
54+
"project": "{}"
55+
}

src/ADOGenerator/Templates/MSL-Deploy-Docker-Template/ImportSourceCode/GitRepository.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)