@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
60 lines • 2.08 kB
TypeScript
import { GitHubStatusContext } from "./GitHubContext";
import { GoalEnvironment } from "./support/environment";
/**
* Core data for a goal
*/
export interface GoalDefinition {
/**
* Must be unique among goals
* Should be camel case
*/
uniqueName: string;
/**
* Optional environment for this goal to run in.
* This is meant to allow for logical grouping of goals from code, testing and production etc.
*/
environment?: GoalEnvironment;
displayName?: string;
plannedDescription?: string;
requestedDescription?: string;
completedDescription?: string;
workingDescription?: string;
failedDescription?: string;
waitingForApprovalDescription?: string;
waitingForPreApprovalDescription?: string;
canceledDescription?: string;
stoppedDescription?: string;
skippedDescription?: string;
isolated?: boolean;
approvalRequired?: boolean;
preApprovalRequired?: boolean;
retryFeasible?: boolean;
}
/**
* Represents a delivery action, such as Build or Deploy.
*/
export declare class Goal {
readonly context: GitHubStatusContext;
readonly definition: GoalDefinition;
get environment(): string;
get successDescription(): string;
get inProcessDescription(): string;
get failureDescription(): string;
get plannedDescription(): string;
get requestedDescription(): string;
get waitingForApprovalDescription(): string;
get waitingForPreApprovalDescription(): string;
get canceledDescription(): string;
get stoppedDescription(): string;
get skippedDescription(): string;
get name(): string;
get uniqueName(): string;
constructor(definition: GoalDefinition);
}
export declare class GoalWithPrecondition extends Goal {
readonly dependsOn: Goal[];
constructor(definition: GoalDefinition, ...dependsOn: Goal[]);
}
export declare function isGoalDefinition(f: Goal | GoalDefinition): f is GoalDefinition;
export declare function hasPreconditions(goal: Goal): goal is GoalWithPrecondition;
//# sourceMappingURL=Goal.d.ts.map