skuba 4.2.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/jest-preset.js +5 -1
  2. package/lib/api/git/index.d.ts +1 -0
  3. package/lib/api/git/index.js +3 -1
  4. package/lib/api/git/index.js.map +1 -1
  5. package/lib/api/git/pull.d.ts +35 -0
  6. package/lib/api/git/pull.js +34 -0
  7. package/lib/api/git/pull.js.map +1 -0
  8. package/lib/api/github/index.d.ts +1 -0
  9. package/lib/api/github/index.js +5 -1
  10. package/lib/api/github/index.js.map +1 -1
  11. package/lib/api/github/push.d.ts +73 -0
  12. package/lib/api/github/push.js +148 -0
  13. package/lib/api/github/push.js.map +1 -0
  14. package/lib/api/jest/index.d.ts +1 -1
  15. package/lib/cli/configure/analyseDependencies.js +1 -2
  16. package/lib/cli/configure/analyseDependencies.js.map +1 -1
  17. package/lib/cli/configure/analysis/diff.d.ts +1 -1
  18. package/lib/cli/configure/analysis/package.d.ts +1 -1
  19. package/lib/cli/configure/processing/ignoreFile.d.ts +1 -1
  20. package/lib/cli/configure/processing/javascript.d.ts +1 -1
  21. package/lib/cli/configure/processing/json.d.ts +1 -1
  22. package/lib/cli/configure/processing/package.d.ts +12 -12
  23. package/lib/cli/lint/autofix.js +24 -13
  24. package/lib/cli/lint/autofix.js.map +1 -1
  25. package/lib/cli/lint/external.d.ts +1 -0
  26. package/lib/cli/test/reporters/github/annotations.js +19 -7
  27. package/lib/cli/test/reporters/github/annotations.js.map +1 -1
  28. package/lib/utils/error.d.ts +1 -1
  29. package/lib/utils/version.d.ts +1 -0
  30. package/lib/utils/version.js +11 -3
  31. package/lib/utils/version.js.map +1 -1
  32. package/lib/wrapper/http.d.ts +1 -1
  33. package/package.json +15 -12
  34. package/template/express-rest-api/.buildkite/pipeline.yml +3 -3
  35. package/template/express-rest-api/Dockerfile +1 -1
  36. package/template/express-rest-api/Dockerfile.dev-deps +1 -1
  37. package/template/express-rest-api/README.md +11 -10
  38. package/template/express-rest-api/gantry.apply.yml +2 -0
  39. package/template/express-rest-api/gantry.build.yml +2 -0
  40. package/template/express-rest-api/package.json +1 -1
  41. package/template/greeter/Dockerfile +1 -1
  42. package/template/greeter/README.md +11 -10
  43. package/template/koa-rest-api/.buildkite/pipeline.yml +3 -3
  44. package/template/koa-rest-api/Dockerfile +1 -1
  45. package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
  46. package/template/koa-rest-api/README.md +11 -10
  47. package/template/koa-rest-api/gantry.apply.yml +2 -0
  48. package/template/koa-rest-api/gantry.build.yml +2 -0
  49. package/template/koa-rest-api/package.json +5 -5
  50. package/template/lambda-sqs-worker/Dockerfile +1 -1
  51. package/template/lambda-sqs-worker/README.md +11 -10
  52. package/template/lambda-sqs-worker/package.json +1 -1
  53. package/template/lambda-sqs-worker/src/framework/logging.ts +1 -1
  54. package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
  55. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +6 -0
  56. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -0
  57. package/template/oss-npm-package/README.md +4 -7
  58. package/template/private-npm-package/README.md +4 -7
  59. package/template/express-rest-api/.me +0 -22
  60. package/template/greeter/.me +0 -20
  61. package/template/koa-rest-api/.me +0 -22
  62. package/template/lambda-sqs-worker/.me +0 -22
  63. package/template/lambda-sqs-worker-cdk/.me +0 -22
  64. package/template/oss-npm-package/.me +0 -21
  65. package/template/private-npm-package/.me +0 -21
@@ -21,13 +21,25 @@ const strip_ansi_1 = __importDefault(require("strip-ansi"));
21
21
  * ...
22
22
  * ```
23
23
  *
24
+ * or:
25
+ *
26
+ * ```console
27
+ * Error: expect(received).toBe(expected) // Object.is equality
28
+ *
29
+ * Expected: "a"
30
+ * Received: "b"
31
+ * at /workdir/skuba/src/test.test.ts:2:15
32
+ * at Promise.then.completed (/workdir/skuba/node_modules/jest-circus/build/utils.js:390:28)
33
+ * ...
34
+ * ```
35
+ *
24
36
  * This pattern will produce the following matches:
25
37
  *
26
38
  * 1. /workdir/skuba/src/test.test.ts
27
39
  * 2. 2
28
40
  * 2. 15
29
41
  */
30
- const JEST_LOCATION_REGEX = /\((.+?):(\d+):(\d+)\)/;
42
+ const JEST_LOCATION_REGEX = /\n +at (.+\()?(.+?):(\d+):(\d+)/;
31
43
  const createAnnotations = (testResults) => {
32
44
  const cwd = process.cwd();
33
45
  return testResults.flatMap((testResult) => {
@@ -44,14 +56,14 @@ const createAnnotations = (testResults) => {
44
56
  if (testResult.numFailingTests > 0) {
45
57
  return testResult.testResults.flatMap((assertionResult) => assertionResult.failureMessages.flatMap((failureMessage) => {
46
58
  const match = JEST_LOCATION_REGEX.exec(failureMessage);
47
- if (match?.length === 4) {
59
+ if (match?.length === 5) {
48
60
  return {
49
61
  annotation_level: 'failure',
50
- path: path_1.default.relative(cwd, match[1]),
51
- start_line: Number(match[2]),
52
- end_line: Number(match[2]),
53
- start_column: Number(match[3]),
54
- end_column: Number(match[3]),
62
+ path: path_1.default.relative(cwd, match[2]),
63
+ start_line: Number(match[3]),
64
+ end_line: Number(match[3]),
65
+ start_column: Number(match[4]),
66
+ end_column: Number(match[4]),
55
67
  message: (0, strip_ansi_1.default)(failureMessage),
56
68
  title: 'Jest',
57
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../../../src/cli/test/reporters/github/annotations.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,4DAAmC;AAInC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE7C,MAAM,iBAAiB,GAAG,CAC/B,WAAyB,EACJ,EAAE;IACvB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACxC,IAAI,UAAU,CAAC,aAAa,EAAE;YAC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Z,CAAC,CAAC,CACH,CAAC;SACH;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAzCW,QAAA,iBAAiB,qBAyC5B;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAOrD,MAAM,yBAAyB,GAAG,CACvC,WAAyB,EACN,EAAE;IAGrB,sCAAsC;IACtC,MAAM,oBAAoB,GAAG,WAAW,CAAC,MAAM,CAC7C,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;QACd,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,oBAAoB,CAAC;QAErE,CAAC,GAAG,CAAC,WAAW,MAAf,GAAG,CAAC,WAAW,IAAM,EAAE,EAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEvC,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAE,CACH,CAAC;IAEF,MAAM,cAAc,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAElE,MAAM,OAAO,GAAG;QACd,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC;KACxC,CAAC;IAEF,4CAA4C;IAC5C,OAAO,OAAO,CAAC,GAAG,CAAkB,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/D,WAAW,EAAE,IAAA,yBAAiB,EAAC,OAAO,CAAC;QACvC,WAAW;KACZ,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AA7BW,QAAA,yBAAyB,6BA6BpC"}
@@ -19,7 +19,7 @@ export declare const ConcurrentlyErrors: t.Array<t.Record<{
19
19
  *
20
20
  * https://nodejs.org/api/util.html#custom-inspection-functions-on-objects
21
21
  */
22
- export declare const createTerseError: (message?: string | undefined) => Error & {
22
+ export declare const createTerseError: (message?: string) => Error & {
23
23
  [inspect.custom]: () => string | undefined;
24
24
  };
25
25
  export declare const handleCliError: (err: unknown) => void;
@@ -1,3 +1,4 @@
1
+ export declare const latestNpmVersion: (packageName: string) => Promise<string>;
1
2
  export declare const getSkubaVersion: () => Promise<string>;
2
3
  declare type SkubaVersionInfo = {
3
4
  isStale: true;
@@ -3,13 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getSkubaVersionInfo = exports.getSkubaVersion = void 0;
7
- const latest_version_1 = __importDefault(require("latest-version"));
6
+ exports.getSkubaVersionInfo = exports.getSkubaVersion = exports.latestNpmVersion = void 0;
7
+ const package_json_1 = __importDefault(require("package-json"));
8
8
  const manifest_1 = require("./manifest");
9
9
  const wait_1 = require("./wait");
10
+ const latestNpmVersion = async (packageName) => {
11
+ const { version } = await (0, package_json_1.default)(packageName);
12
+ if (typeof version !== 'string') {
13
+ throw new Error(`No version found for package "${packageName}"`);
14
+ }
15
+ return version;
16
+ };
17
+ exports.latestNpmVersion = latestNpmVersion;
10
18
  const latestSkubaVersion = async () => {
11
19
  try {
12
- const result = await (0, wait_1.withTimeout)((0, latest_version_1.default)('skuba'), { s: 2 });
20
+ const result = await (0, wait_1.withTimeout)((0, exports.latestNpmVersion)('skuba'), { s: 2 });
13
21
  return result.ok ? result.value : null;
14
22
  }
15
23
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":";;;;;;AAAA,oEAA2C;AAE3C,yCAA8C;AAC9C,iCAAqC;AAErC,MAAM,kBAAkB,GAAG,KAAK,IAA4B,EAAE;IAC5D,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAW,EAAC,IAAA,wBAAa,EAAC,OAAO,CAAC,EAAE,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AAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEF,MAAM,kBAAkB,GAAG,KAAK,IAA4B,EAAE;IAC5D,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAW,EAAC,IAAA,wBAAgB,EAAC,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAEtE,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;KACxC;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEK,MAAM,eAAe,GAAG,KAAK,IAAqB,EAAE;IACzD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,2BAAgB,GAAE,CAAC;IAE7C,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B;AAgBK,MAAM,mBAAmB,GAAG,KAAK,IAA+B,EAAE;IACvE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxC,IAAA,uBAAe,GAAE;QACjB,kBAAkB,EAAE;KACrB,CAAC,CAAC;IAEH,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,6DAA6D;QAC7D,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK;YACL,MAAM;SACP,CAAC;KACH;IAED,OAAO;QACL,OAAO,EAAE,MAAM,KAAK,KAAK;QACzB,KAAK;QACL,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
@@ -11,4 +11,4 @@ export declare const createRequestListenerFromFunction: (fn: (...args: unknown[]
11
11
  *
12
12
  * This function resolves when the server is closed.
13
13
  */
14
- export declare const serveRequestListener: (requestListener: http.RequestListener, port?: number | undefined) => Promise<void>;
14
+ export declare const serveRequestListener: (requestListener: http.RequestListener, port?: number) => Promise<void>;
package/package.json CHANGED
@@ -6,9 +6,11 @@
6
6
  "url": "https://github.com/seek-oss/skuba/issues"
7
7
  },
8
8
  "dependencies": {
9
+ "@octokit/graphql": "^4.8.0",
10
+ "@octokit/graphql-schema": "^10.73.0",
9
11
  "@octokit/rest": "^18.12.0",
10
12
  "@octokit/types": "^6.34.0",
11
- "@types/jest": "^27.5.0",
13
+ "@types/jest": "^28.0.0",
12
14
  "@types/node": ">=14.18",
13
15
  "chalk": "^4.1.0",
14
16
  "concurrently": "^7.0.0",
@@ -16,7 +18,7 @@
16
18
  "ejs": "^3.1.6",
17
19
  "enquirer": "^2.3.6",
18
20
  "eslint": "^8.11.0",
19
- "eslint-config-skuba": "1.1.0",
21
+ "eslint-config-skuba": "1.1.1",
20
22
  "execa": "^5.0.0",
21
23
  "fdir": "^5.0.0",
22
24
  "fs-extra": "^10.0.0",
@@ -26,13 +28,14 @@
26
28
  "is-installed-globally": "^0.4.0",
27
29
  "isomorphic-git": "^1.11.1",
28
30
  "jest": "^28.1.0",
29
- "latest-version": "^5.1.0",
31
+ "jest-watch-typeahead": "^1.1.0",
30
32
  "lodash.mergewith": "^4.6.2",
31
33
  "normalize-package-data": "^4.0.0",
32
34
  "npm-run-path": "^4.0.1",
33
35
  "npm-which": "^3.0.1",
36
+ "package-json": "^7.0.0",
34
37
  "picomatch": "^2.2.2",
35
- "prettier": "~2.6.0",
38
+ "prettier": "~2.7.0",
36
39
  "read-pkg-up": "^7.0.1",
37
40
  "runtypes": "^6.0.0",
38
41
  "semantic-release": "^19.0.0",
@@ -41,16 +44,16 @@
41
44
  "strip-ansi": "^6.0.1",
42
45
  "ts-jest": "^28.0.2",
43
46
  "ts-node": "^10.7.0",
44
- "ts-node-dev": "^2.0.0-0",
47
+ "ts-node-dev": "^2.0.0",
45
48
  "tsconfig-paths": "^4.0.0",
46
49
  "tsconfig-seek": "1.0.2",
47
- "typescript": "~4.6.4"
50
+ "typescript": "~4.7.0"
48
51
  },
49
52
  "description": "SEEK development toolkit for backend applications and packages",
50
53
  "devDependencies": {
51
- "@changesets/cli": "2.22.0",
52
- "@changesets/get-github-info": "0.5.0",
53
- "@jest/reporters": "28.1.0",
54
+ "@changesets/cli": "2.23.0",
55
+ "@changesets/get-github-info": "0.5.1",
56
+ "@jest/reporters": "28.1.1",
54
57
  "@types/ejs": "3.1.1",
55
58
  "@types/express": "4.17.13",
56
59
  "@types/fs-extra": "9.0.13",
@@ -64,10 +67,10 @@
64
67
  "express": "4.18.1",
65
68
  "jsonfile": "6.1.0",
66
69
  "koa": "2.13.4",
67
- "memfs": "3.4.3",
70
+ "memfs": "3.4.6",
68
71
  "semver": "7.3.7",
69
72
  "supertest": "6.2.3",
70
- "type-fest": "2.12.2"
73
+ "type-fest": "2.13.1"
71
74
  },
72
75
  "engines": {
73
76
  "node": ">=14.18"
@@ -123,5 +126,5 @@
123
126
  "version": "4.0.0"
124
127
  },
125
128
  "types": "./lib/index.d.ts",
126
- "version": "4.2.1"
129
+ "version": "4.3.0"
127
130
  }
@@ -61,7 +61,7 @@ steps:
61
61
  - *aws-sm
62
62
  - *private-npm
63
63
  - *docker-ecr-cache
64
- - seek-jobs/gantry#v1.7.0:
64
+ - seek-jobs/gantry#v1.8.1:
65
65
  command: build
66
66
  file: gantry.build.yml
67
67
  region: <%- region %>
@@ -78,7 +78,7 @@ steps:
78
78
  concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
79
79
  key: deploy-dev
80
80
  plugins:
81
- - seek-jobs/gantry#v1.7.0:
81
+ - seek-jobs/gantry#v1.8.1:
82
82
  command: apply
83
83
  environment: <%- devGantryEnvironmentName %>
84
84
  file: gantry.apply.yml
@@ -93,7 +93,7 @@ steps:
93
93
  concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
94
94
  depends_on: deploy-dev
95
95
  plugins:
96
- - seek-jobs/gantry#v1.7.0:
96
+ - seek-jobs/gantry#v1.8.1:
97
97
  command: apply
98
98
  environment: <%- prodGantryEnvironmentName %>
99
99
  file: gantry.apply.yml
@@ -17,7 +17,7 @@ RUN yarn build
17
17
 
18
18
  ###
19
19
 
20
- FROM gcr.io/distroless/nodejs:16 AS runtime
20
+ FROM --platform=arm64 gcr.io/distroless/nodejs:16 AS runtime
21
21
 
22
22
  WORKDIR /workdir
23
23
 
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.2
2
2
 
3
- FROM node:16-alpine AS dev-deps
3
+ FROM --platform=arm64 node:16-alpine AS dev-deps
4
4
 
5
5
  WORKDIR /workdir
6
6
 
@@ -4,17 +4,17 @@
4
4
 
5
5
  Next steps:
6
6
 
7
- 1. [ ] Finish templating if this was skipped earlier:
7
+ 1. [ ] Check if your team has a Graviton-based Buildkite cluster;
8
+ see the [ARM64 guide] for more information.
9
+ 2. [ ] Finish templating if this was skipped earlier:
8
10
 
9
11
  ```shell
10
12
  yarn skuba configure
11
13
  ```
12
14
 
13
- 2. [ ] Create a new repository in the appropriate GitHub organisation.
14
- 3. [ ] Add the repository to BuildAgency;
15
+ 3. [ ] Create a new repository in the appropriate GitHub organisation.
16
+ 4. [ ] Add the repository to BuildAgency;
15
17
  see [Builds at SEEK] for more information.
16
- 4. [ ] Fill out [.me](.me) to power SEEK's system catalogue;
17
- see the [Codex] documentation for more information.
18
18
  5. [ ] Add Datadog configuration and data classification tags to [.gantry/common.yml](.gantry/common.yml);
19
19
  see the [Gantry] documentation for more information.
20
20
  6. [ ] Push local commits to the upstream GitHub branch.
@@ -23,6 +23,12 @@ Next steps:
23
23
  request installation in [SEEK-Jobs/renovate].
24
24
  9. [ ] Delete this checklist 😌.
25
25
 
26
+ [arm64]: https://seek-oss.github.io/skuba/docs/deep-dives/arm64.html
27
+ [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
28
+ [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
29
+ [renovate]: https://github.com/apps/renovate
30
+ [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
31
+
26
32
  ## Design
27
33
 
28
34
  <%-repoName %> is a Node.js HTTP server built in line with our [technology strategy].
@@ -101,12 +107,7 @@ TODO: add support links for the prod environment.
101
107
  - Splunk logs
102
108
  -->
103
109
 
104
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
105
110
  [codedeploy]: https://docs.aws.amazon.com/codedeploy
106
- [codex]: https://codex.ssod.skinfra.xyz/docs
107
111
  [express]: https://expressjs.com
108
112
  [gantry]: https://gantry.ssod.skinfra.xyz
109
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
110
- [renovate]: https://github.com/apps/renovate
111
- [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
112
113
  [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
@@ -118,3 +118,5 @@ tags:
118
118
  {{range $key, $value := .Values.tags}}
119
119
  {{$key}}: '{{$value}}'
120
120
  {{end}}
121
+
122
+ cpuArchitecture: arm64
@@ -11,3 +11,5 @@ buildArgs:
11
11
 
12
12
  # SEEK-Jobs/gantry#1661
13
13
  failOnScanFindings: false
14
+
15
+ cpuArchitecture: arm64
@@ -8,7 +8,7 @@
8
8
  "@types/express": "^4.17.13",
9
9
  "@types/node": "^16.0.0",
10
10
  "@types/supertest": "^2.0.11",
11
- "pino-pretty": "^7.1.0",
11
+ "pino-pretty": "^8.0.0",
12
12
  "skuba": "*",
13
13
  "supertest": "^6.1.6"
14
14
  },
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.2
2
2
 
3
- FROM node:16-alpine AS dev-deps
3
+ FROM --platform=arm64 node:16-alpine AS dev-deps
4
4
 
5
5
  WORKDIR /workdir
6
6
 
@@ -4,23 +4,29 @@
4
4
 
5
5
  Next steps:
6
6
 
7
- 1. [ ] Finish templating if this was skipped earlier:
7
+ 1. [ ] Check if your team has a Graviton-based Buildkite cluster;
8
+ see the [ARM64 guide] for more information.
9
+ 2. [ ] Finish templating if this was skipped earlier:
8
10
 
9
11
  ```shell
10
12
  yarn skuba configure
11
13
  ```
12
14
 
13
- 2. [ ] Create a new repository in the appropriate GitHub organisation.
14
- 3. [ ] Add the repository to BuildAgency;
15
+ 3. [ ] Create a new repository in the appropriate GitHub organisation.
16
+ 4. [ ] Add the repository to BuildAgency;
15
17
  see [Builds at SEEK] for more information.
16
- 4. [ ] Fill out [.me](.me) to power SEEK's system catalogue;
17
- see the [Codex] documentation for more information.
18
18
  5. [ ] Push local commits to the upstream GitHub branch.
19
19
  6. [ ] Configure [GitHub repository settings].
20
20
  7. [ ] Keep dependencies up to date with [Renovate];
21
21
  request installation in [SEEK-Jobs/renovate].
22
22
  8. [ ] Delete this checklist 😌.
23
23
 
24
+ [arm64]: https://seek-oss.github.io/skuba/docs/deep-dives/arm64.html
25
+ [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
26
+ [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
27
+ [renovate]: https://github.com/apps/renovate
28
+ [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
29
+
24
30
  ## Design
25
31
 
26
32
  The `greeter` template is the prototypical _hello world_ project.
@@ -94,9 +100,4 @@ TODO: add support links for the prod environment.
94
100
  - Splunk logs
95
101
  -->
96
102
 
97
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
98
- [codex]: https://codex.ssod.skinfra.xyz/docs
99
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
100
- [renovate]: https://github.com/apps/renovate
101
- [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
102
103
  [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
@@ -61,7 +61,7 @@ steps:
61
61
  - *aws-sm
62
62
  - *private-npm
63
63
  - *docker-ecr-cache
64
- - seek-jobs/gantry#v1.7.0:
64
+ - seek-jobs/gantry#v1.8.1:
65
65
  command: build
66
66
  file: gantry.build.yml
67
67
  region: <%- region %>
@@ -78,7 +78,7 @@ steps:
78
78
  concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
79
79
  key: deploy-dev
80
80
  plugins:
81
- - seek-jobs/gantry#v1.7.0:
81
+ - seek-jobs/gantry#v1.8.1:
82
82
  command: apply
83
83
  environment: <%- devGantryEnvironmentName %>
84
84
  file: gantry.apply.yml
@@ -93,7 +93,7 @@ steps:
93
93
  concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
94
94
  depends_on: deploy-dev
95
95
  plugins:
96
- - seek-jobs/gantry#v1.7.0:
96
+ - seek-jobs/gantry#v1.8.1:
97
97
  command: apply
98
98
  environment: <%- prodGantryEnvironmentName %>
99
99
  file: gantry.apply.yml
@@ -17,7 +17,7 @@ RUN yarn build
17
17
 
18
18
  ###
19
19
 
20
- FROM gcr.io/distroless/nodejs:16 AS runtime
20
+ FROM --platform=arm64 gcr.io/distroless/nodejs:16 AS runtime
21
21
 
22
22
  WORKDIR /workdir
23
23
 
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.2
2
2
 
3
- FROM node:16-alpine AS dev-deps
3
+ FROM --platform=arm64 node:16-alpine AS dev-deps
4
4
 
5
5
  WORKDIR /workdir
6
6
 
@@ -4,17 +4,17 @@
4
4
 
5
5
  Next steps:
6
6
 
7
- 1. [ ] Finish templating if this was skipped earlier:
7
+ 1. [ ] Check if your team has a Graviton-based Buildkite cluster;
8
+ see the [ARM64 guide] for more information.
9
+ 2. [ ] Finish templating if this was skipped earlier:
8
10
 
9
11
  ```shell
10
12
  yarn skuba configure
11
13
  ```
12
14
 
13
- 2. [ ] Create a new repository in the appropriate GitHub organisation.
14
- 3. [ ] Add the repository to BuildAgency;
15
+ 3. [ ] Create a new repository in the appropriate GitHub organisation.
16
+ 4. [ ] Add the repository to BuildAgency;
15
17
  see [Builds at SEEK] for more information.
16
- 4. [ ] Fill out [.me](.me) to power SEEK's system catalogue;
17
- see the [Codex] documentation for more information.
18
18
  5. [ ] Add Datadog configuration and data classification tags to [.gantry/common.yml](.gantry/common.yml);
19
19
  see the [Gantry] documentation for more information.
20
20
  6. [ ] Push local commits to the upstream GitHub branch.
@@ -23,6 +23,12 @@ Next steps:
23
23
  request installation in [SEEK-Jobs/renovate].
24
24
  9. [ ] Delete this checklist 😌.
25
25
 
26
+ [arm64]: https://seek-oss.github.io/skuba/docs/deep-dives/arm64.html
27
+ [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
28
+ [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
29
+ [renovate]: https://github.com/apps/renovate
30
+ [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
31
+
26
32
  ## Design
27
33
 
28
34
  <%-repoName %> is a Node.js HTTP server built in line with our [technology strategy].
@@ -106,12 +112,7 @@ TODO: add support links for the prod environment.
106
112
  - Splunk logs
107
113
  -->
108
114
 
109
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
110
115
  [codedeploy]: https://docs.aws.amazon.com/codedeploy
111
- [codex]: https://codex.ssod.skinfra.xyz/docs
112
116
  [gantry]: https://gantry.ssod.skinfra.xyz
113
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
114
117
  [koa]: https://koajs.com
115
- [renovate]: https://github.com/apps/renovate
116
- [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
117
118
  [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
@@ -125,3 +125,5 @@ tags:
125
125
  {{range $key, $value := .Values.tags}}
126
126
  {{$key}}: '{{$value}}'
127
127
  {{end}}
128
+
129
+ cpuArchitecture: arm64
@@ -11,3 +11,5 @@ buildArgs:
11
11
 
12
12
  # SEEK-Jobs/gantry#1661
13
13
  failOnScanFindings: false
14
+
15
+ cpuArchitecture: arm64
@@ -3,9 +3,9 @@
3
3
  "@koa/router": "^10.1.1",
4
4
  "@opentelemetry/api": "^1.1.0",
5
5
  "@opentelemetry/exporter-collector-grpc": "^0.25.0",
6
- "@opentelemetry/instrumentation-aws-sdk": "^0.7.0",
7
- "@opentelemetry/instrumentation-http": "^0.28.0",
8
- "@opentelemetry/sdk-node": "^0.28.0",
6
+ "@opentelemetry/instrumentation-aws-sdk": "^0.8.0",
7
+ "@opentelemetry/instrumentation-http": "^0.29.2",
8
+ "@opentelemetry/sdk-node": "^0.29.2",
9
9
  "@seek/logger": "^5.0.1",
10
10
  "aws-sdk": "^2.1039.0",
11
11
  "hot-shots": "^9.0.0",
@@ -15,7 +15,7 @@
15
15
  "runtypes": "^6.4.1",
16
16
  "runtypes-filter": "^0.6.0",
17
17
  "seek-datadog-custom-metrics": "^4.0.0",
18
- "seek-koala": "^5.2.0",
18
+ "seek-koala": "^6.0.0",
19
19
  "skuba-dive": "^2.0.0",
20
20
  "uuid": "^8.3.2"
21
21
  },
@@ -28,7 +28,7 @@
28
28
  "@types/supertest": "^2.0.11",
29
29
  "@types/uuid": "^8.3.1",
30
30
  "chance": "^1.1.8",
31
- "pino-pretty": "^7.1.0",
31
+ "pino-pretty": "^8.0.0",
32
32
  "skuba": "*",
33
33
  "supertest": "^6.1.6"
34
34
  },
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.2
2
2
 
3
- FROM node:16-alpine AS dev-deps
3
+ FROM --platform=arm64 node:16-alpine AS dev-deps
4
4
 
5
5
  WORKDIR /workdir
6
6
 
@@ -4,17 +4,17 @@
4
4
 
5
5
  Next steps:
6
6
 
7
- 1. [ ] Finish templating if this was skipped earlier:
7
+ 1. [ ] Check if your team has a Graviton-based Buildkite cluster;
8
+ see the [ARM64 guide] for more information.
9
+ 2. [ ] Finish templating if this was skipped earlier:
8
10
 
9
11
  ```shell
10
12
  yarn skuba configure
11
13
  ```
12
14
 
13
- 2. [ ] Create a new repository in the appropriate GitHub organisation.
14
- 3. [ ] Add the repository to BuildAgency;
15
+ 3. [ ] Create a new repository in the appropriate GitHub organisation.
16
+ 4. [ ] Add the repository to BuildAgency;
15
17
  see [Builds at SEEK] for more information.
16
- 4. [ ] Fill out [.me](.me) to power SEEK's system catalogue;
17
- see the [Codex] documentation for more information.
18
18
  5. [ ] Add deployment bucket configuration and data classification tags to [serverless.yml](serverless.yml).
19
19
  6. [ ] Push local commits to the upstream GitHub branch.
20
20
  7. [ ] Configure [GitHub repository settings].
@@ -22,6 +22,12 @@ Next steps:
22
22
  request installation in [SEEK-Jobs/renovate].
23
23
  9. [ ] Delete this checklist 😌.
24
24
 
25
+ [arm64]: https://seek-oss.github.io/skuba/docs/deep-dives/arm64.html
26
+ [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
27
+ [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
28
+ [renovate]: https://github.com/apps/renovate
29
+ [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
30
+
25
31
  ## Design
26
32
 
27
33
  <%-repoName %> is a Node.js [Lambda] application built in line with our [technology strategy].
@@ -127,12 +133,7 @@ TODO: add support links for the prod environment.
127
133
  - Splunk logs
128
134
  -->
129
135
 
130
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
131
136
  [codedeploy]: https://docs.aws.amazon.com/codedeploy
132
- [codex]: https://codex.ssod.skinfra.xyz/docs
133
- [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
134
137
  [lambda]: https://docs.aws.amazon.com/lambda
135
- [renovate]: https://github.com/apps/renovate
136
- [seek-jobs/renovate]: https://github.com/SEEK-Jobs/renovate
137
138
  [serverless]: https://www.serverless.com/
138
139
  [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
@@ -12,7 +12,7 @@
12
12
  "@types/chance": "^1.1.3",
13
13
  "@types/node": "^16.0.0",
14
14
  "chance": "^1.1.8",
15
- "pino-pretty": "^7.1.0",
15
+ "pino-pretty": "^8.0.0",
16
16
  "serverless": "^3.17.0",
17
17
  "serverless-plugin-canary-deployments": "^0.8.0",
18
18
  "serverless-prune-plugin": "^2.0.0",
@@ -18,7 +18,7 @@ export const logger = createLogger({
18
18
 
19
19
  level: config.logLevel,
20
20
 
21
- mixin: () => loggerContext.getStore() ?? {},
21
+ mixin: () => ({ ...loggerContext.getStore() }),
22
22
 
23
23
  name: config.name,
24
24
 
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.2
2
2
 
3
- FROM node:16-alpine AS dev-deps
3
+ FROM --platform=arm64 node:16-alpine AS dev-deps
4
4
 
5
5
  WORKDIR /workdir
6
6
 
@@ -146,6 +146,9 @@ Object {
146
146
  "workerServiceRole2130CC7F",
147
147
  ],
148
148
  "Properties": Object {
149
+ "Architectures": Array [
150
+ "arm64",
151
+ ],
149
152
  "Code": Object {
150
153
  "S3Bucket": Object {
151
154
  "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
@@ -502,6 +505,9 @@ Object {
502
505
  "workerServiceRole2130CC7F",
503
506
  ],
504
507
  "Properties": Object {
508
+ "Architectures": Array [
509
+ "arm64",
510
+ ],
505
511
  "Code": Object {
506
512
  "S3Bucket": Object {
507
513
  "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
@@ -51,6 +51,7 @@ export class AppStack extends Stack {
51
51
  });
52
52
 
53
53
  const worker = new aws_lambda.Function(this, 'worker', {
54
+ architecture: aws_lambda.Architecture.ARM_64,
54
55
  code: new aws_lambda.AssetCode('./lib'),
55
56
  runtime: aws_lambda.Runtime.NODEJS_16_X,
56
57
  handler: 'app.handler',