Skipper.Config (skipper_core v1.0.0)

Copy Markdown View Source

Skipper configuration.

credentials is one of:

  • {:file, path} — service-account JSON key file
  • {:base64, encoded} — base64-encoded service-account JSON (CI secrets)
  • {:service_account, map} — inline service-account fields (string or atom keys)

Summary

Functions

Build a config from the environment: SKIPPER_SPREADSHEET_ID, credentials from SKIPPER_CREDENTIALS_FILE (wins) or GOOGLE_CREDS_B64, optional SKIPPER_SHEET_NAME and comma-separated SKIPPER_REFERENCE_SHEETS. Returns nil when Skipper is not configured.

Resolve the credentials to a service-account map (string keys).

Types

credentials()

@type credentials() ::
  {:file, Path.t()} | {:base64, String.t()} | {:service_account, map()}

t()

@type t() :: %Skipper.Config{
  credentials: credentials(),
  disabled_until_column: String.t(),
  reference_sheets: [String.t()],
  sheet_name: String.t() | nil,
  spreadsheet_id: String.t(),
  test_id_column: String.t()
}

Functions

from_env()

@spec from_env() :: t() | nil

Build a config from the environment: SKIPPER_SPREADSHEET_ID, credentials from SKIPPER_CREDENTIALS_FILE (wins) or GOOGLE_CREDS_B64, optional SKIPPER_SHEET_NAME and comma-separated SKIPPER_REFERENCE_SHEETS. Returns nil when Skipper is not configured.

service_account(other)

@spec service_account(credentials()) :: {:ok, map()} | {:error, String.t()}

Resolve the credentials to a service-account map (string keys).