Global

Methods

actionFailureNotifySlack(failure)

Notify slack of action failure

Source:
Parameters:
Name Type Description
failure Error

bitbucketWebhook(event)

Validate Bitbucket webhook source using User-Agent header

Source:
Parameters:
Name Type Description
event object

buildChange(event)

Update build details on change

Source:
Parameters:
Name Type Description
event object

buildChange(event)

Parse an event from a change in a CodeBuild service build

Source:
Parameters:
Name Type Description
event object

buildChangeNotifyBitbucket(event)

Notify github of build change status

Source:
Parameters:
Name Type Description
event object

buildChangeNotifyGithub()

Notify github of build change status

Source:

buildChangeNotifySlack(event)

Notify slack of build change status

Source:
Parameters:
Name Type Description
event object

countBuilds(event)

Count number of current builds (use count+1 for next build number)

Source:
Parameters:
Name Type Description
event object

decodeBody(event)

Decode event.body using query-string.parse()

Source:
Parameters:
Name Type Description
event object

deployBuild(event)

Deploy build (from parsed deployments)

Source:
Parameters:
Name Type Description
event object

deploymentNotifyAirbrake(event)

Notify Airbrake of deployment

Source:
Parameters:
Name Type Description
event object

deployments(event)

Parse deployments from event build details

Source:
Parameters:
Name Type Description
event object

describeStack(stack)

Wrapper to describe CF stack as Promise

Source:
Parameters:
Name Type Description
stack string

findClusterName(stack)

Describe current service stack and find parent cluster name

Source:
Parameters:
Name Type Description
stack string

findClusterStack(stack)

Describe current service stack and find parent cluster stack to determine actual ECS cluster name

Source:
Parameters:
Name Type Description
stack string

findMigrationTask(stack)

Search ECS task definitions for "-db-migrate" suffix

Source:
Parameters:
Name Type Description
stack string

getStatusColor(status)

Map the status of a stack change to a basic Slack message color

Source:
Parameters:
Name Type Description
status string

githubWebhook()

Validate github webhooks

Source:

init(event)

Initialize every action by beginning the promise chain

Source:
Parameters:
Name Type Description
event object

initMigration(stack)

Initialize migration (fail gracefully)

Source:
Parameters:
Name Type Description
stack string

parseBody(event)

Parse event.body using JSON.parse()

Source:
Parameters:
Name Type Description
event object

parsePayload(event)

Parse decoded body payload

Source:
Parameters:
Name Type Description
event object

prepareBuild(event)

Prepare build from event body

Source:
Parameters:
Name Type Description
event object

runMigration(cluster, taskDefinition)

Trigger migration task from found cluster and task definition

Source:
Parameters:
Name Type Description
cluster string
taskDefinition string

slackCommand()

Parse info from a Slack slash command event

Source:

slackCommand()

Validate Slack slash command events

Source:

slackResponse()

Parse info from a Slack response

Source:

slackResponse()

Validate Slack response events

Source:

stackChange(event)

Parse SNS Records into Slack messages

Source:
Parameters:
Name Type Description
event object

stackChange(event)

Handle a stack change event (as published from SNS topic)

Source:
Parameters:
Name Type Description
event object

stackChange(event)

Handle a stack change event (as published from SNS topic)

Source:
Parameters:
Name Type Description
event object

stackChange(event)

Handle a stack change event (as published from SNS topic)

Source:
Parameters:
Name Type Description
event object

startBuild(event)

Start build using CodeBuild Project (if build has been prepared)

Source:
Parameters:
Name Type Description
event object

trackBuild(event)

Track build details (update row in DynamoDB with build data)

Source:
Parameters:
Name Type Description
event object