1 | import { MachineConfiguration } from "@atomist/sdm/api/machine/MachineConfiguration";
|
2 | import { SoftwareDeliveryMachine } from "@atomist/sdm/api/machine/SoftwareDeliveryMachine";
|
3 | import { SoftwareDeliveryMachineConfiguration } from "@atomist/sdm/api/machine/SoftwareDeliveryMachineOptions";
|
4 | import { GoalSetter } from "@atomist/sdm/api/mapping/GoalSetter";
|
5 | /**
|
6 | * Create a **Software Delivery MachineConfiguration** with default predefined goals.
|
7 | * Combines commands and delivery event handling using _goals_.
|
8 | *
|
9 | * Goals and goal "implementations" can be defined by users.
|
10 | * However, certain well known goals are built into the DefaultSoftwareDeliveryMachine
|
11 | * for convenience, with their own associated listeners.
|
12 | *
|
13 | * Well known goal support is based around a delivery process spanning
|
14 | * common goals of fingerprinting, reacting to fingerprint diffs,
|
15 | * code review, build, deployment, endpoint verification and
|
16 | * promotion to a production environment.
|
17 | *
|
18 | * The most important element of a software delivery machine is setting
|
19 | * zero or more _push rules_ in the constructor.
|
20 | * This is normally done using the internal DSL as follows:
|
21 | *
|
22 | * ```
|
23 | * const sdm = createSoftwareDeliveryMachine(
|
24 | * "MyMachine",
|
25 | * options,
|
26 | * whenPushSatisfies(IsMaven, HasSpringBootApplicationClass, not(MaterialChangeToJavaRepo))
|
27 | * .itMeans("No material change to Java")
|
28 | * .setGoals(NoGoals),
|
29 | * whenPushSatisfies(ToDefaultBranch, IsMaven, HasSpringBootApplicationClass, HasCloudFoundryManifest)
|
30 | * .itMeans("Spring Boot service to deploy")
|
31 | * .setGoals(HttpServiceGoals));
|
32 | * ```
|
33 | *
|
34 | * Uses the builder pattern to allow fluent construction. For example:
|
35 | *
|
36 | * ```
|
37 | * softwareDeliveryMachine
|
38 | * .addPushReaction(async pu => ...)
|
39 | * .addNewIssueListener(async i => ...)
|
40 | * .add...;
|
41 | * ```
|
42 | */
|
43 | export declare function createSoftwareDeliveryMachine(config: MachineConfiguration<SoftwareDeliveryMachineConfiguration>, ...goalSetters: Array<GoalSetter | GoalSetter[]>): SoftwareDeliveryMachine<SoftwareDeliveryMachineConfiguration>;
|
44 | //# sourceMappingURL=machineFactory.d.ts.map |
\ | No newline at end of file |