Need private packages and team management tools?Check out npm Teams »

@atomist/sdm-pack-s3

0.5.0 • Public • Published

@atomist/sdm-pack-s3

atomist sdm goals npm version

An extension pack for an Atomist software delivery machine (SDM). See the Atomist documentation for more information on the concept of a software delivery machine and how to create and develop an SDM.

Send your project's build output to S3 using the publishToS3 goal.

Using

In your software delivery machine project:

npm install @atomist/sdm-pack-s3

then in your machine.ts:

import { publishToS3Goal } from "@atomist/sdm-pack-s3";
 
    const publish = publishToS3Goal({
        bucketName: "your-bucket-name",
        region: "us-west-2", // use your region
        filesToPublish: ["site/**/*.html", "more/files/to/publish"],
        pathTranslation: (filepath, inv) => filepath, // rearrange files if necessary
        pathToIndex: "site/index.html", // index file in your project
    });

If you need a build to happen before the publish, call withProjectListener() on that goal and pass a GoalProjectListenerRegistration.

Add this publish goal to one of your goal sets.

    const publishGoals = goals("publish static site to S3")
        .plan(publish);
 
    sdm.withPushRules(
        whenPushSatisfies(requestsUploadToS3).setGoals(publishGoals),
    );

Getting started

See the Developer Quick Start to jump straight to creating an SDM.

Support

General support questions should be discussed in the #support channel in the Atomist community Slack workspace.

If you find a problem, please create an issue.

Development

See the Atomist developer documentation for information on how to write your own SDM features and automations.

Release

Releases are handled via the Atomist SDM. Just press the 'Approve' button in the Atomist dashboard or Slack.


Created by Atomist. Need Help? Join our Slack workspace.

Install

npm i @atomist/sdm-pack-s3

DownloadsWeekly Downloads

28

Version

0.5.0

License

Apache-2.0

Unpacked Size

185 kB

Total Files

22

Last publish

Collaborators

  • avatar