@@ -34,18 +34,8 @@ Checks for a `user-agent` header that starts with either:
34
34
35
35
Compatible with Gantry v2.3.7 and newer.
36
36
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
- ```
37
+ ` SKIP_SMOKE ` will require additional setup. Consider setting the environment variable on your API based on the surrounding CI environment,
38
+ like the build message or an explicit environment variable against the build.
49
39
50
40
### ` isLambdaHook `
51
41
@@ -59,7 +49,7 @@ while continuing to run the checks as per usual on subsequent health check polli
59
49
``` typescript
60
50
const handler = (event : Event , ctx : Context ) => {
61
51
if (! Object .entries (event ).length ) {
62
- if (process .env .SKIP_HOOK && isLambdaHook (event , ctx )) {
52
+ if (process .env .SKIP_SMOKE && isLambdaHook (event , ctx )) {
63
53
// Expedite deployment even if dependencies are unhealthy.
64
54
return ;
65
55
}
@@ -78,6 +68,19 @@ Checks for:
78
68
- An empty event object
79
69
- A custom ` user-agent ` in context that starts with ` aws-codedeploy-hook-BeforeAllowTraffic/ `
80
70
71
+ ` SKIP_SMOKE ` will require additional setup. Consider setting the environment variable on your Lambda function based on the surrounding CI environment:
72
+
73
+ ``` typescript
74
+ import { containsSkipDirective } from ' @seek/aws-codedeploy-hooks' ;
75
+
76
+ const lambdaEnvironment = {
77
+ SKIP_SMOKE: containsSkipDirective (process .env .BUILDKITE_MESSAGE , ' smoke' )
78
+ ? ' true'
79
+ : undefined ,
80
+ // ... other environment variables
81
+ };
82
+ ```
83
+
81
84
### ` smokeTest.koaMiddleware `
82
85
83
86
A Koa middleware that executes a smoke test function to check whether the application is broadly operational and ready to serve requests.
0 commit comments