Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UnmetPreconditions to TaskResource #684

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions source/Octopus.Server.Client/Model/PreconditionStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

namespace Octopus.Client.Model
{
public class PreconditionStatus
{
/// <summary>
/// The human-readable name of the precondition which has raised
/// this message/status
/// </summary>
public string PreconditionName { get; set; }

/// <summary>
/// A human-readable statement indicating the status of the
/// Precondition
/// </summary>
public string Message { get; set; }

/// <summary>
/// True if this precondition will outright fail the task (terminal)
/// False if this precondition will delay the task's execution
/// </summary>
public bool WillFailTask { get; set; }
}
}
8 changes: 8 additions & 0 deletions source/Octopus.Server.Client/Model/TaskResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ public bool FinishedSuccessfully
[JsonProperty(Order = 34)]
public bool HasWarningsOrErrors { get; set; }

/// <summary>
/// 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
/// </summary>
[JsonProperty(Order = 35)]
public List<PreconditionStatus> UnmetPreconditions { get; set; }

public string SpaceId { get; set; }
}
}