Change to generic exception handler for better visibility
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m44s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m44s
This commit is contained in:
parent
d7ca461fc8
commit
4be01f477f
2 changed files with 72 additions and 62 deletions
|
@ -1,30 +1,8 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Build Schema",
|
||||
"$ref": "#/definitions/build",
|
||||
"definitions": {
|
||||
"build": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Configuration": {
|
||||
"type": "string",
|
||||
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
|
||||
"enum": [
|
||||
"Debug",
|
||||
"Release"
|
||||
]
|
||||
},
|
||||
"Continue": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates to continue a previously failed build attempt"
|
||||
},
|
||||
"Help": {
|
||||
"type": "boolean",
|
||||
"description": "Shows the help text for this build assembly"
|
||||
},
|
||||
"Host": {
|
||||
"type": "string",
|
||||
"description": "Host for execution. Default is 'automatic'",
|
||||
"enum": [
|
||||
"AppVeyor",
|
||||
"AzurePipelines",
|
||||
|
@ -43,6 +21,40 @@
|
|||
"VSCode"
|
||||
]
|
||||
},
|
||||
"ExecutableTarget": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Clean",
|
||||
"Compile",
|
||||
"Publish",
|
||||
"Restore",
|
||||
"Test"
|
||||
]
|
||||
},
|
||||
"Verbosity": {
|
||||
"type": "string",
|
||||
"description": "",
|
||||
"enum": [
|
||||
"Verbose",
|
||||
"Normal",
|
||||
"Minimal",
|
||||
"Quiet"
|
||||
]
|
||||
},
|
||||
"NukeBuild": {
|
||||
"properties": {
|
||||
"Continue": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates to continue a previously failed build attempt"
|
||||
},
|
||||
"Help": {
|
||||
"type": "boolean",
|
||||
"description": "Shows the help text for this build assembly"
|
||||
},
|
||||
"Host": {
|
||||
"description": "Host for execution. Default is 'automatic'",
|
||||
"$ref": "#/definitions/Host"
|
||||
},
|
||||
"NoLogo": {
|
||||
"type": "boolean",
|
||||
"description": "Disables displaying the NUKE logo"
|
||||
|
@ -70,45 +82,42 @@
|
|||
"type": "array",
|
||||
"description": "List of targets to be skipped. Empty list skips all dependencies",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Clean",
|
||||
"Compile",
|
||||
"Publish",
|
||||
"Restore",
|
||||
"Test"
|
||||
]
|
||||
"$ref": "#/definitions/ExecutableTarget"
|
||||
}
|
||||
},
|
||||
"Solution": {
|
||||
"type": "string",
|
||||
"description": "Path to a solution file that is automatically loaded"
|
||||
},
|
||||
"Target": {
|
||||
"type": "array",
|
||||
"description": "List of targets to be invoked. Default is '{default_target}'",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Clean",
|
||||
"Compile",
|
||||
"Publish",
|
||||
"Restore",
|
||||
"Test"
|
||||
]
|
||||
"$ref": "#/definitions/ExecutableTarget"
|
||||
}
|
||||
},
|
||||
"Verbosity": {
|
||||
"type": "string",
|
||||
"description": "Logging verbosity during build execution. Default is 'Normal'",
|
||||
"$ref": "#/definitions/Verbosity"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Configuration": {
|
||||
"type": "string",
|
||||
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
|
||||
"enum": [
|
||||
"Minimal",
|
||||
"Normal",
|
||||
"Quiet",
|
||||
"Verbose"
|
||||
"Debug",
|
||||
"Release"
|
||||
]
|
||||
},
|
||||
"Solution": {
|
||||
"type": "string",
|
||||
"description": "Path to a solution file that is automatically loaded"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/NukeBuild"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ using Newtonsoft.Json;
|
|||
using Robware.Projects.Code;
|
||||
using Robware.Projects.Gogs.Models;
|
||||
using Robware.Projects.Gogs.States;
|
||||
using System;
|
||||
|
||||
namespace Robware.Projects.Gogs {
|
||||
public class GogsApi : IGitApi {
|
||||
|
@ -24,7 +25,7 @@ namespace Robware.Projects.Gogs {
|
|||
try {
|
||||
return (await Get<IEnumerable<RepositoryState>>($"api/v1/users/{user}/repos")).Select(state => new GogsRepository(state));
|
||||
}
|
||||
catch (HttpRequestException e) {
|
||||
catch (Exception e) {
|
||||
throw new UserNotFoundException(user, e);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +34,7 @@ namespace Robware.Projects.Gogs {
|
|||
try {
|
||||
return (await Get<IEnumerable<BranchState>>($"api/v1/repos/{user}/{repository}/branches")).Select(state => new GogsBranch(state));
|
||||
}
|
||||
catch (HttpRequestException e) {
|
||||
catch (Exception e) {
|
||||
throw new RepositoryNotFoundException(user, repository, e);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ namespace Robware.Projects.Gogs {
|
|||
try {
|
||||
return new GogsCommit(await Get<CommitDetailsState>($"api/v1/repos/{user}/{repository}/commits/{hash}"));
|
||||
}
|
||||
catch (HttpRequestException e) {
|
||||
catch (Exception e) {
|
||||
throw new CommitNotFoundException(user, repository, hash, e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue