Skip to content

Commit 0febd9e

Browse files
AaronMoat72636c
andauthored
Clarify smoke skipping (#125)
* Clarify smoke skipping * Update packages/hooks/README.md Co-authored-by: Ryan Ling <[email protected]> --------- Co-authored-by: Ryan Ling <[email protected]>
1 parent 45439f0 commit 0febd9e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/hooks/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ while continuing to run the checks as per usual on subsequent health check polli
1717

1818
```typescript
1919
const smokeTest = (req: Request) => {
20-
if (process.env.SKIP_HOOK && isHttpHook(req)) {
20+
if (process.env.SKIP_SMOKE && isHttpHook(req)) {
2121
// Expedite deployment even if dependencies are unhealthy.
2222
return;
2323
}
@@ -34,6 +34,19 @@ Checks for a `user-agent` header that starts with either:
3434

3535
Compatible with Gantry v2.3.7 and newer.
3636

37+
`SKIP_SMOKE` will require additional setup. Consider setting the environment variable on your lambda based on the surrounding CI environment:
38+
39+
```typescript
40+
import { containsSkipDirective } from '@seek/aws-codedeploy-hooks';
41+
42+
const lambdaEnvironment = {
43+
SKIP_SMOKE: containsSkipDirective(process.env.BUILDKITE_MESSAGE, 'smoke')
44+
? 'true'
45+
: undefined,
46+
// ... other environment variables
47+
};
48+
```
49+
3750
### `isLambdaHook`
3851

3952
Whether the Lambda invocation originated from AWS CodeDeploy Hooks.

0 commit comments

Comments
 (0)