UNPKG

1.83 kBTypeScriptView Raw
1import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
2import { HandlerResult } from "@atomist/automation-client/lib/HandlerResult";
3import { ExecuteGoalResult } from "../../api/goal/ExecuteGoalResult";
4import { Goal } from "../../api/goal/Goal";
5import { ExecuteGoal, GoalInvocation, GoalProjectListenerRegistration } from "../../api/goal/GoalInvocation";
6import { SdmGoalEvent } from "../../api/goal/SdmGoalEvent";
7import { GoalImplementation } from "../../api/goal/support/GoalImplementationMapper";
8import { GoalExecutionListener } from "../../api/listener/GoalStatusListener";
9import { SoftwareDeliveryMachineConfiguration } from "../../api/machine/SoftwareDeliveryMachineOptions";
10import { ProjectLoader } from "../../spi/project/ProjectLoader";
11/**
12 * Central function to execute a goal with progress logging
13 */
14export declare function executeGoal(rules: {
15 projectLoader: ProjectLoader;
16 goalExecutionListeners: GoalExecutionListener[];
17}, implementation: GoalImplementation, gi: GoalInvocation): Promise<ExecuteGoalResult>;
18export declare function executeHook(rules: {
19 projectLoader: ProjectLoader;
20}, goalInvocation: GoalInvocation, sdmGoal: SdmGoalEvent, stage: "post" | "pre"): Promise<HandlerResult>;
21export declare function markStatus(parameters: {
22 context: HandlerContext;
23 goalEvent: SdmGoalEvent;
24 goal: Goal;
25 result: ExecuteGoalResult;
26 error?: Error;
27 progressLogUrl: string;
28}): Promise<void>;
29export declare function prepareGoalExecutor(gi: GoalImplementation, sdmGoal: SdmGoalEvent, configuration: SoftwareDeliveryMachineConfiguration): ExecuteGoal;
30export declare function prepareGoalInvocation(gi: GoalInvocation, listeners: GoalProjectListenerRegistration | GoalProjectListenerRegistration[]): GoalInvocation;
31//# sourceMappingURL=executeGoal.d.ts.map
\No newline at end of file