1.2.0-backpack.20181117095745 • Published 7 years ago

@atomist/sdm-pack-fingerprints v1.2.0-backpack.20181117095745

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
7 years ago

@atomist/sdm-pack-fingerprints

atomist sdm goals npm version

Atomist software delivery machine (SDM) extension pack providing fingerprinting support.

See the Atomist documentation for more information on what SDMs are and what they can do for you using the Atomist API for software.

Features

This pack sets a goal to monitor all git pushes and trackes the following features:

  • leiningen project.clj files are monitored for updates to library dependencies and project version.
  • maven pom.xml files are monitored for updates to maven library dependencies and version coordinates.
  • npm package.json files are monitored for updates to module dependencies and package version changes.

This monitoring happens computing a set of fingerprints on every commit. The fingerprints that are computed depend on the type of project. We currently compute fingerprints for maven, clojure, and npm projects.

  • npm-project-deps, clojure-project-deps, and maven-project-deps
  • npm-project-coordinates, clojure-project-coordinates, maven-project-coordinates

When a new fingerprint is computed, we can drive interesting behaviors such as:

  • check whether a library is up to date with a set of team-wide goals and offer to push a PR if not
  • check whether a new version of a library is available and check whether consumers need to update to this new version

Usage

Make the following updates to your machine:

  1. Add the imports and create a Goal to represent dependency fingerprinting
import { fingerprintSupport } from "@atomist/sdm-pack-fingerprints";
import { Fingerprint } from "@atomist/sdm";

// create a goal to fingerprint all new Pushes
export FingerprintGoal = new Fingerprint();
  1. Enable the FingerprintGoal for some push rules. Normally, this is done as part of creating your machine:
    // there will usually be more than one Push rule here
    const sdm = createSoftwareDeliveryMachine({
            ...config
        },
        whenPushSatisfies(IsLein)
            .itMeans("fingerprint a clojure project")
            .setGoals(FingerprintGoal));
  1. Add the pack to your new sdm definition
    // add this pack to your SDM
    sdm.addExtensionPacks(
        fingerprintSupport(FingerprintGoal),
    )

Out of the box, this pack adds functionality to watch for library versions out of sync with your team's version goals. However, other fingerprint diff handlers can be added to the call to fingerprintSupport:

    // add this pack to your SDM
    sdm.addExtensionPacks(
        fingerprintSupport(
            FingerprintGoal,
            {
                selector: forFingerprints(
                    "clojure-project-coordinates",
                    "npm-project-coordinates"),
                diffHandler: async (ctx, diff) => {
                    return setNewTarget(
                        ctx,
                        diff.to.name,
                        diff.to.data.name,
                        diff.to.data.version,
                        diff.channel);
                },
            },
        ),        
    )

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

You will need to install node to build and test this project.

Build and test

Use the following package scripts to build, test, and perform other development tasks.

CommandReason
npm installinstall project dependencies
npm run buildcompile, test, lint, and generate docs
npm run lintrun TSLint against the TypeScript
npm run compilegenerate types from GraphQL and compile TypeScript
npm testrun tests
npm run autotestrun tests every time a file changes
npm run cleanremove files generated during build

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.

slack: https://join.atomist.com/ (Atomist Community Slack

4.0.4

6 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

7 years ago

3.2.2

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.10

7 years ago

3.0.9

7 years ago

3.0.8

7 years ago

3.0.7

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.4.7

7 years ago

1.4.6

7 years ago

1.4.5

7 years ago

1.4.4

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.0.0-RC.1

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0-M.5

7 years ago

1.0.0-M.4

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.2.0

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago