Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "core/machine/machineFactory"

Index

Functions

createSoftwareDeliveryMachine

  • Create a Software Delivery MachineConfiguration with default predefined goals. Combines commands and delivery event handling using goals.

    Goals and goal "implementations" can be defined by users. However, certain well known goals are built into the DefaultSoftwareDeliveryMachine for convenience, with their own associated listeners.

    Well known goal support is based around a delivery process spanning common goals of fingerprinting, reacting to fingerprint diffs, code review, build, deployment, endpoint verification and promotion to a production environment.

    The most important element of a software delivery machine is setting zero or more push rules in the constructor. This is normally done using the internal DSL as follows:

    const sdm = createSoftwareDeliveryMachine(
       "MyMachine",
       options,
       whenPushSatisfies(IsMaven, HasSpringBootApplicationClass, not(MaterialChangeToJavaRepo))
         .itMeans("No material change to Java")
         .setGoals(NoGoals),
       whenPushSatisfies(ToDefaultBranch, IsMaven, HasSpringBootApplicationClass, HasCloudFoundryManifest)
         .itMeans("Spring Boot service to deploy")
         .setGoals(HttpServiceGoals));
    

    Uses the builder pattern to allow fluent construction. For example:

    softwareDeliveryMachine
       .addPushReaction(async pu => ...)
       .addNewIssueListener(async i => ...)
       .add...;
    

    Parameters

    Returns SoftwareDeliveryMachine<SoftwareDeliveryMachineConfiguration>

Generated using TypeDoc