From 7b759b51f7e761b51a5d91a811c76be0bd0866d3 Mon Sep 17 00:00:00 2001 From: Trent Mohay Date: Tue, 16 Aug 2022 13:01:29 +1000 Subject: [PATCH 1/2] Add UnmetPrecondition to TaskResource --- .../Model/PreconditionStatus.cs | 24 +++++++++++++++++++ .../Model/TaskResource.cs | 8 +++++++ .../Octopus.Server.Client.csproj | 6 ++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 source/Octopus.Server.Client/Model/PreconditionStatus.cs diff --git a/source/Octopus.Server.Client/Model/PreconditionStatus.cs b/source/Octopus.Server.Client/Model/PreconditionStatus.cs new file mode 100644 index 000000000..88a625f6d --- /dev/null +++ b/source/Octopus.Server.Client/Model/PreconditionStatus.cs @@ -0,0 +1,24 @@ + +namespace Octopus.Client.Model +{ + public class PreconditionStatus + { + /// + /// The human-readable name of the precondition which has raised + /// this message/status + /// + public string PreconditionName { get; set; } + + /// + /// A human-readable statement indicating the status of the + /// Precondition + /// + public string Message { get; set; } + + /// + /// True if this precondition will outright fail the task (terminal) + /// False if this precondition will delay the task's execution + /// + public bool WillFailTask { get; set; } + } +} \ No newline at end of file diff --git a/source/Octopus.Server.Client/Model/TaskResource.cs b/source/Octopus.Server.Client/Model/TaskResource.cs index 46259ffa2..e19c714a9 100644 --- a/source/Octopus.Server.Client/Model/TaskResource.cs +++ b/source/Octopus.Server.Client/Model/TaskResource.cs @@ -163,6 +163,14 @@ public bool FinishedSuccessfully [JsonProperty(Order = 34)] public bool HasWarningsOrErrors { get; set; } + /// + /// Contains a list of all Preconditions which must be + /// satisfied prior to this task executing. An empty list + /// implies the task is able to run at its scheduled time + /// + [JsonProperty(Order = 35)] + public List UnmetPreconditions { get; set; } + public string SpaceId { get; set; } } } \ No newline at end of file diff --git a/source/Octopus.Server.Client/Octopus.Server.Client.csproj b/source/Octopus.Server.Client/Octopus.Server.Client.csproj index 20e502739..30f8550df 100644 --- a/source/Octopus.Server.Client/Octopus.Server.Client.csproj +++ b/source/Octopus.Server.Client/Octopus.Server.Client.csproj @@ -17,19 +17,19 @@ This package contains the non-ILmerged client library for the HTTP API in Octopu latest - net462;netstandard2.0 + net452;netstandard2.0 netstandard2.0 - + embedded $(DefineConstants);FULL_FRAMEWORK $(DefineConstants);HTTP_CLIENT_SUPPORTS_SSL_OPTIONS;LIBLOG_PORTABLE - + From 5764d668b0c0a54e2db558e8a768d4ac91700800 Mon Sep 17 00:00:00 2001 From: Trent Mohay Date: Tue, 16 Aug 2022 13:02:27 +1000 Subject: [PATCH 2/2] clean up --- source/Octopus.Server.Client/Octopus.Server.Client.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Octopus.Server.Client/Octopus.Server.Client.csproj b/source/Octopus.Server.Client/Octopus.Server.Client.csproj index 30f8550df..20e502739 100644 --- a/source/Octopus.Server.Client/Octopus.Server.Client.csproj +++ b/source/Octopus.Server.Client/Octopus.Server.Client.csproj @@ -17,19 +17,19 @@ This package contains the non-ILmerged client library for the HTTP API in Octopu latest - net452;netstandard2.0 + net462;netstandard2.0 netstandard2.0 - + embedded $(DefineConstants);FULL_FRAMEWORK $(DefineConstants);HTTP_CLIENT_SUPPORTS_SSL_OPTIONS;LIBLOG_PORTABLE - +