Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LocalSoftwareDeliveryMachineConfiguration<AdditionalConfiguration>

Configuration that takes SoftwareDeliveryMachineOptions inside the sdm key.

Type parameters

  • AdditionalConfiguration = {}

Hierarchy

Indexable

[key: string]: any

Abuse goes here

Index

Properties

Optional apiKey

apiKey: string

Atomist API Key used to authenticate the user starting the client.

Optional application

application: string

Application identifier used for metrics send to statsd. If not set, the automation client package name with any namespace prefix removed is used.

Optional cluster

cluster: { enabled?: boolean; maxConcurrentPerWorker?: number; workers?: number }

Whether and how many workers to start up. If enabled is true and workers is false, a number of workers equal to the number of available CPUs will be started.

Type declaration

  • Optional enabled?: boolean
  • Optional maxConcurrentPerWorker?: number
  • Optional workers?: number

Optional commands

commands: Array<Maker<HandleCommand>>

Automation commands this package provides. If empty or null, the package will be scanned for commands, which must be under a directory named "commands".

Optional endpoints

endpoints: { api?: string; auth?: string; graphql?: string }

Atomist API endpoints

Type declaration

  • Optional api?: string
  • Optional auth?: string
  • Optional graphql?: string

Optional environment

environment: string

environment automation is running in, e.g., "production" or "testing"

Optional events

events: Array<Maker<HandleEvent>>

Automation event handlers this package provides. If empty or null, the package will be scanned for event handlers, which must be under a directory named "events".

Optional graphql

graphql: { client?: { factory: GraphClientFactory }; listeners?: GraphClientListener[] }

Type declaration

  • Optional client?: { factory: GraphClientFactory }
    • factory: GraphClientFactory
  • Optional listeners?: GraphClientListener[]

Optional groups

groups: string[]

DO NOT USE. Groups this automation will be registered with. Must be specified if teams is not specified. Cannot be specified if teams is specified. Providing groups indicates this is a global automation, which can only successfully be registered by Atomist.

Optional http

http: { client?: { factory?: HttpClientFactory }; enabled?: boolean } & Partial<ExpressServerOptions>

HTTP configuration, useful for health checks

Optional ingesters

ingesters: string[]

Custom event ingester

Optional keywords

keywords: string[]

keywords useful for discovery

Optional listeners

listeners: AutomationEventListener[]

Log and metric sinks

local

Optional logging

logging: { banner?: { contributors?: Array<(configuration: Configuration) => string | BannerSection>; enabled?: boolean; message?: string | ((configuration: Configuration) => Banner) }; callsite?: boolean; color?: boolean; custom?: any; file?: { enabled?: boolean; level?: "silly" | "debug" | "verbose" | "info" | "warn" | "error"; name?: string }; level?: "silly" | "debug" | "verbose" | "info" | "warn" | "error" }

Logging configuration

Type declaration

  • Optional banner?: { contributors?: Array<(configuration: Configuration) => string | BannerSection>; enabled?: boolean; message?: string | ((configuration: Configuration) => Banner) }

    Print welcome banner; set to an arbitrary string to display, default is name of automation-client

    • Optional contributors?: Array<(configuration: Configuration) => string | BannerSection>

      Add content to the banner which shows up between handlers and footer

    • Optional enabled?: boolean
    • Optional message?: string | ((configuration: Configuration) => Banner)

      Message or Banner to be printed at the top of the banner

  • Optional callsite?: boolean

    Log the file name and line number of the JS file calling the log method

  • Optional color?: boolean

    Enable color output in log output

  • Optional custom?: any

    Custom log configuration, useful if your logging solution requires host, port, token, etc. configuration.

  • Optional file?: { enabled?: boolean; level?: "silly" | "debug" | "verbose" | "info" | "warn" | "error"; name?: string }

    Log to file; set to file path to overwrite location and name of logfile, defaults to ./log/automation-client.log in current working directory

    • Optional enabled?: boolean
    • Optional level?: "silly" | "debug" | "verbose" | "info" | "warn" | "error"
    • Optional name?: string
  • Optional level?: "silly" | "debug" | "verbose" | "info" | "warn" | "error"

    Log level, default is "info"

Optional metadataProcessor

metadataProcessor: AutomationMetadataProcessor

Register a custom AutomationMetadataProcessor

Optional name

name: string

Automation name. If not given, the name is extracted from the package.json.

Optional policy

policy: "ephemeral" | "durable"

If events should be queued when the registration is not connected to the websocket, specificy "durable". "ephemeral" is suited for testing and running locally and is the default.

Optional postProcessors

postProcessors: ConfigurationPostProcessor[]

Post-processors can be used to modify the configuration after all standard configuration loading has been done and before the client is started. Post-processors return a configuration promise so they can be asynchronous.

Optional redact

redact: { log?: boolean; messages?: boolean; patterns?: Array<{ regexp: RegExp | string; replacement?: string }> }

Redaction configuration

Type declaration

  • Optional log?: boolean

    Redact log messages

  • Optional messages?: boolean

    Redact messages send via the message client

  • Optional patterns?: Array<{ regexp: RegExp | string; replacement?: string }>

    Register patterns to look for and optional replacements

Optional requestProcessorFactory

requestProcessorFactory: (automations: AutomationServer, configuration: Configuration, listeners: AutomationEventListener[]) => RequestProcessor

Type declaration

    • (automations: AutomationServer, configuration: Configuration, listeners: AutomationEventListener[]): RequestProcessor
    • Parameters

      • automations: AutomationServer
      • configuration: Configuration
      • listeners: AutomationEventListener[]

      Returns RequestProcessor

sdm

sdm: SoftwareDeliveryMachineOptions & AdditionalConfiguration & AnyOptions

Optional secretResolver

secretResolver: SecretResolver

Register a custom secret resolver

Optional statsd

statsd: { client?: { factory: StatsDClientFactory }; enabled?: boolean; host?: string; port?: number }

statsd config

Type declaration

  • Optional client?: { factory: StatsDClientFactory }

    statsd client factory to create instances of StatsDClient

    • factory: StatsDClientFactory
  • Optional enabled?: boolean

    Whether to send metrics statsd, default is false

  • Optional host?: string

    statsd host. If not set, use the host-shots default, "localhost" at the time of this writing.

  • Optional port?: number

    statsd port. If not set, use the hot-shots default, 8125 at the time of this writing.

Optional version

version: string

Automation version. Must be a valid semantic version, https://semver.org/. If not given, the version is extracted from the package.json.

Optional workspaceIds

workspaceIds: string[]

Atomist workspaces this automation will be registered with. Must be specified if groups is not specified. Cannot be specified if groups is specified.

Optional ws

ws: { backoff?: { duration?: number; factor?: number; interval?: number; threshold?: number }; client?: { factory?: WebSocketFactory }; compress?: boolean; enabled?: boolean; termination?: { gracePeriod?: number; graceful?: boolean }; timeout?: number }

websocket configuration

Type declaration

  • Optional backoff?: { duration?: number; factor?: number; interval?: number; threshold?: number }

    Configure backoff behavior on the WS connection

    • Optional duration?: number

      Duration in ms the backend should backoff before sending any more messages

    • Optional factor?: number

      Factor (0 < x <= 1) multiply threshold to get to the lower backoff boundary

    • Optional interval?: number

      Interval in ms to check threshold

    • Optional threshold?: number

      Max number of the pending messages in the queue before initiating backoff

  • Optional client?: { factory?: WebSocketFactory }
    • Optional factory?: WebSocketFactory
  • Optional compress?: boolean

    compress messages over websocket

  • Optional enabled?: boolean
  • Optional termination?: { gracePeriod?: number; graceful?: boolean }
    • Optional gracePeriod?: number

      Grace period in milliseconds. Note the actual time to shutdown gracefully may be more than twice this, as this period is used to first wait for requests and then used again to wait for any cluster workers to shutdown. If some part of the shutdown hangs, it could take up to ten times this period for all processes to exit.

    • Optional graceful?: boolean

      If true, wait for up to gracePeriod milliseconds to process in-flight and queued requests.

  • Optional timeout?: number

    timeout in milliseconds

Generated using TypeDoc