UNPKG

1.67 kBTypeScriptView Raw
1import { ExecuteGoal, GoalWithFulfillment, PredicatedGoalDefinition, ProjectAwareGoalInvocation, SoftwareDeliveryMachine } from "@atomist/sdm";
2import * as AWS from "aws-sdk";
3import { PublishToS3Options } from "./options";
4/**
5 * An array of fileglobs to paths within the project
6 */
7export declare type GlobPatterns = string[];
8/**
9 * Get a goal that will publish (portions of) a project to S3.
10 * If the project needs to be built or otherwise processed first, use
11 * `.withProjectListeners` to get those prerequisite steps done.
12 */
13export declare class PublishToS3 extends GoalWithFulfillment {
14 private readonly options;
15 constructor(options: PublishToS3Options & PredicatedGoalDefinition);
16 /**
17 * Called by the SDM on initialization. This function calls
18 * `super.register` and adds a startup listener to the SDM. The
19 * startup listener registers a default goal fulfillment if there
20 * is none that suppresses logs posted to chat.
21 */
22 register(sdm: SoftwareDeliveryMachine): void;
23}
24export declare function executePublishToS3(inputParams: PublishToS3Options): ExecuteGoal;
25interface PushToS3Result {
26 bucketUrl: string;
27 warnings: string[];
28 fileCount: number;
29 deleted: number;
30}
31/**
32 * Push files in project to S3 according to options provided by
33 * `params`.
34 *
35 * @param s3 S3 client
36 * @param inv goal invocation with project to upload
37 * @param params options for upload
38 * @return information on upload success and warnings
39 */
40export declare function pushToS3(s3: AWS.S3, inv: ProjectAwareGoalInvocation, params: PublishToS3Options): Promise<PushToS3Result>;
41export {};
42//# sourceMappingURL=publishToS3.d.ts.map
\No newline at end of file