-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding support for new workflow_job event. (#1019)
Added support for new workflow_job event, the check_run event will remain for backwards compatibility
- Loading branch information
Showing
22 changed files
with
2,113 additions
and
2,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
831 changes: 308 additions & 523 deletions
831
modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { scaleDown } from './scale-runners/scale-down'; | ||
|
||
|
||
export function run(): void { | ||
scaleDown(); | ||
scaleDown(); | ||
} | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
import { scaleUp } from './scale-runners/scale-up'; | ||
import { scaleUp, ActionRequestMessage } from './scale-runners/scale-up'; | ||
|
||
const sqsEvent = { | ||
Records: [ | ||
{ | ||
messageId: 'e8d74d08-644e-42ca-bf82-a67daa6c4dad', | ||
// eslint-disable-next-line max-len | ||
receiptHandle: 'AQEBCpLYzDEKq4aKSJyFQCkJduSKZef8SJVOperbYyNhXqqnpFG5k74WygVAJ4O0+9nybRyeOFThvITOaS21/jeHiI5fgaM9YKuI0oGYeWCIzPQsluW5CMDmtvqv1aA8sXQ5n2x0L9MJkzgdIHTC3YWBFLQ2AxSveOyIHwW+cHLIFCAcZlOaaf0YtaLfGHGkAC4IfycmaijV8NSlzYgDuxrC9sIsWJ0bSvk5iT4ru/R4+0cjm7qZtGlc04k9xk5Fu6A+wRxMaIyiFRY+Ya19ykcevQldidmEjEWvN6CRToLgclk=', | ||
// eslint-disable-next-line max-len | ||
body: { "id": 19072, "repositoryName": "ErrBud", "repositoryOwner": "ActionsTest", "eventType": "check_run", "installationId": 5 }, | ||
attributes: { | ||
ApproximateReceiveCount: '1', | ||
SentTimestamp: '1626450047230', | ||
SequenceNumber: '18863115285800432640', | ||
MessageGroupId: '19072', | ||
SenderId: 'AROA5KW7SQ6TTB3PW6WPH:cicddev-webhook', | ||
MessageDeduplicationId: '0c458eeb87b7f6d2607301268fd3bf33dd898a49ebd888754ff7db510c4bff1e', | ||
ApproximateFirstReceiveTimestamp: '1626450077251' | ||
}, | ||
messageAttributes: {}, | ||
md5OfBody: '4aef3bd70526e152e86426a0938cbec6', | ||
eventSource: 'aws:sqs', | ||
eventSourceARN: 'arn:aws:sqs:us-west-2:916370655143:cicddev-queued-builds.fifo', | ||
awsRegion: 'us-west-2' | ||
} | ||
] | ||
Records: [ | ||
{ | ||
messageId: 'e8d74d08-644e-42ca-bf82-a67daa6c4dad', | ||
receiptHandle: | ||
// eslint-disable-next-line max-len | ||
'AQEBCpLYzDEKq4aKSJyFQCkJduSKZef8SJVOperbYyNhXqqnpFG5k74WygVAJ4O0+9nybRyeOFThvITOaS21/jeHiI5fgaM9YKuI0oGYeWCIzPQsluW5CMDmtvqv1aA8sXQ5n2x0L9MJkzgdIHTC3YWBFLQ2AxSveOyIHwW+cHLIFCAcZlOaaf0YtaLfGHGkAC4IfycmaijV8NSlzYgDuxrC9sIsWJ0bSvk5iT4ru/R4+0cjm7qZtGlc04k9xk5Fu6A+wRxMaIyiFRY+Ya19ykcevQldidmEjEWvN6CRToLgclk=', | ||
body: { | ||
id: 19072, | ||
repositoryName: 'ErrBud', | ||
repositoryOwner: 'ActionsTest', | ||
eventType: 'check_run', | ||
installationId: 5, | ||
}, | ||
attributes: { | ||
ApproximateReceiveCount: '1', | ||
SentTimestamp: '1626450047230', | ||
SequenceNumber: '18863115285800432640', | ||
MessageGroupId: '19072', | ||
SenderId: 'AROA5KW7SQ6TTB3PW6WPH:cicddev-webhook', | ||
MessageDeduplicationId: '0c458eeb87b7f6d2607301268fd3bf33dd898a49ebd888754ff7db510c4bff1e', | ||
ApproximateFirstReceiveTimestamp: '1626450077251', | ||
}, | ||
messageAttributes: {}, | ||
md5OfBody: '4aef3bd70526e152e86426a0938cbec6', | ||
eventSource: 'aws:sqs', | ||
eventSourceARN: 'arn:aws:sqs:us-west-2:916370655143:cicddev-queued-builds.fifo', | ||
awsRegion: 'us-west-2', | ||
}, | ||
], | ||
}; | ||
export function run(): void { | ||
scaleUp(sqsEvent.Records[0].eventSource, sqsEvent.Records[0].body); | ||
scaleUp(sqsEvent.Records[0].eventSource, sqsEvent.Records[0].body as ActionRequestMessage); | ||
} | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
modules/runners/lambdas/runners/src/scale-runners/modules.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
declare namespace NodeJS { | ||
export interface ProcessEnv { | ||
ENVIRONMENT: string | ||
SUBNET_IDS: string | ||
GHES_URL: string | ||
SCALE_DOWN_CONFIG: string | ||
MINIMUM_RUNNING_TIME_IN_MINUTES: string | ||
LAUNCH_TEMPLATE_NAME: string | ||
AWS_REGION: string | ||
PARAMETER_GITHUB_APP_CLIENT_ID_NAME: string | ||
PARAMETER_GITHUB_APP_CLIENT_SECRET_NAME: string | ||
PARAMETER_GITHUB_APP_ID_NAME: string | ||
PARAMETER_GITHUB_APP_KEY_BASE64_NAME: string | ||
} | ||
export interface ProcessEnv { | ||
ENVIRONMENT: string; | ||
SUBNET_IDS: string; | ||
GHES_URL: string; | ||
SCALE_DOWN_CONFIG: string; | ||
MINIMUM_RUNNING_TIME_IN_MINUTES: string; | ||
LAUNCH_TEMPLATE_NAME: string; | ||
AWS_REGION: string; | ||
PARAMETER_GITHUB_APP_CLIENT_ID_NAME: string; | ||
PARAMETER_GITHUB_APP_CLIENT_SECRET_NAME: string; | ||
PARAMETER_GITHUB_APP_ID_NAME: string; | ||
PARAMETER_GITHUB_APP_KEY_BASE64_NAME: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.