Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "core/util/webhook/ImageLink"

Index

Type aliases

AtomistBuildStatus

AtomistBuildStatus: "started" | "failed" | "error" | "passed" | "canceled"

AtomistBuildType

AtomistBuildType: "cron" | "pull_request" | "push" | "tag" | "manual"

AtomistWebhookType

AtomistWebhookType: "application" | "build" | "link-image"

Functions

postBuildWebhook

  • postBuildWebhook(owner: string, repo: string, branch: string, commit: string, status: AtomistBuildStatus, teamId: string, retryOptions?: RetryOptions): Promise<boolean>
  • Post to the Atomist generic build webhook URL. It creates the payload then uses postWebhook.

    Parameters

    • owner: string

      repository owner, i.e., user or organization

    • repo: string

      name of repository

    • branch: string

      commit branch

    • commit: string

      commit SHA

    • status: AtomistBuildStatus

      "start", "success", or "fail"

    • teamId: string

      Atomist team ID

    • Default value retryOptions: RetryOptions = DefaultRetryOptions

      change default retry options

    Returns Promise<boolean>

    true if successful, false on failure after retries

postWebhook

  • Post payload to the Atomist webhook URL. It will retry several times.

    Parameters

    • webhook: AtomistWebhookType

      type of webhook

    • payload: any

      object to post

    • teamId: string

      Atomist team ID

    • Default value retryOptions: RetryOptions = DefaultRetryOptions

      change default retry options

    Returns Promise<boolean>

    true if successful, false on failure after retries

Object literals

Const DefaultRetryOptions

DefaultRetryOptions: object

factor

factor: number = 2

maxTimeout

maxTimeout: number = 5 * 1000

minTimeout

minTimeout: number = 1 * 500

randomize

randomize: boolean = true

retries

retries: number = 10

Generated using TypeDoc