diff --git a/docs/deep-dives/pnpm.md b/docs/deep-dives/pnpm.md index 7a6c93ccb..8c32e0caf 100644 --- a/docs/deep-dives/pnpm.md +++ b/docs/deep-dives/pnpm.md @@ -210,7 +210,9 @@ This migration guide assumes that your project was scaffolded with a **skuba** t ```diff FROM --platform=arm64 node:20-alpine AS dev-deps - + RUN corepack enable pnpm + + RUN --mount=type=bind,source=package.json,target=package.json \ + + corepack enable pnpm + + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir @@ -279,7 +281,7 @@ This migration guide assumes that your project was scaffolded with a **skuba** t Your build pipeline may have previously output an ephemeral `.npmrc` with an auth token on the build agent. This needs to be output elsewhere to avoid overwriting the new pnpm configuration stored in `.npmrc`. - Swap out caching on `package.json` and `yarn.lock` for `.npmrc` and `pnpm-lock.yaml` at the same time. + Swap out caching on `yarn.lock` for `.npmrc` and `pnpm-lock.yaml` at the same time. ```diff seek-oss/private-npm#v1.2.0: @@ -290,9 +292,9 @@ This migration guide assumes that your project was scaffolded with a **skuba** t ```diff seek-oss/docker-ecr-cache#v2.1.0: cache-on: - - - package.json - - - yarn.lock + - .npmrc + - package.json + - - yarn.lock + - pnpm-lock.yaml dockerfile: Dockerfile.dev-deps - secrets: id=npm,src=.npmrc diff --git a/template/express-rest-api/.buildkite/pipeline.yml b/template/express-rest-api/.buildkite/pipeline.yml index c3d8541d6..b36b73580 100644 --- a/template/express-rest-api/.buildkite/pipeline.yml +++ b/template/express-rest-api/.buildkite/pipeline.yml @@ -12,6 +12,7 @@ configs: seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults cache-on: - .npmrc + - package.json - pnpm-lock.yaml dockerfile: Dockerfile.dev-deps secrets: id=npm,src=tmp/.npmrc diff --git a/template/express-rest-api/Dockerfile.dev-deps b/template/express-rest-api/Dockerfile.dev-deps index 2d717eb70..62cee15a9 100644 --- a/template/express-rest-api/Dockerfile.dev-deps +++ b/template/express-rest-api/Dockerfile.dev-deps @@ -2,7 +2,9 @@ FROM --platform=<%- platformName %> node:20-alpine AS dev-deps -RUN corepack enable pnpm +RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir diff --git a/template/greeter/.buildkite/pipeline.yml b/template/greeter/.buildkite/pipeline.yml index 7c6c083af..f5ffe53f1 100644 --- a/template/greeter/.buildkite/pipeline.yml +++ b/template/greeter/.buildkite/pipeline.yml @@ -1,6 +1,8 @@ agents: queue: <%- prodBuildkiteQueueName %> +# Allow conditional unblock + dodgy CI stuffs + configs: plugins: - &aws-sm @@ -12,6 +14,7 @@ configs: seek-oss/docker-ecr-cache#v2.1.1: cache-on: - .npmrc + - package.json - pnpm-lock.yaml secrets: id=npm,src=tmp/.npmrc diff --git a/template/greeter/Dockerfile b/template/greeter/Dockerfile index 2d717eb70..62cee15a9 100644 --- a/template/greeter/Dockerfile +++ b/template/greeter/Dockerfile @@ -2,7 +2,9 @@ FROM --platform=<%- platformName %> node:20-alpine AS dev-deps -RUN corepack enable pnpm +RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir diff --git a/template/koa-rest-api/.buildkite/pipeline.yml b/template/koa-rest-api/.buildkite/pipeline.yml index c3d8541d6..b36b73580 100644 --- a/template/koa-rest-api/.buildkite/pipeline.yml +++ b/template/koa-rest-api/.buildkite/pipeline.yml @@ -12,6 +12,7 @@ configs: seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults cache-on: - .npmrc + - package.json - pnpm-lock.yaml dockerfile: Dockerfile.dev-deps secrets: id=npm,src=tmp/.npmrc diff --git a/template/koa-rest-api/Dockerfile.dev-deps b/template/koa-rest-api/Dockerfile.dev-deps index 2d717eb70..62cee15a9 100644 --- a/template/koa-rest-api/Dockerfile.dev-deps +++ b/template/koa-rest-api/Dockerfile.dev-deps @@ -2,7 +2,9 @@ FROM --platform=<%- platformName %> node:20-alpine AS dev-deps -RUN corepack enable pnpm +RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir diff --git a/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml b/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml index 34bda313d..ab7ecabcc 100644 --- a/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +++ b/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml @@ -12,6 +12,7 @@ configs: seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults cache-on: - .npmrc + - package.json - pnpm-lock.yaml secrets: id=npm,src=tmp/.npmrc diff --git a/template/lambda-sqs-worker-cdk/Dockerfile b/template/lambda-sqs-worker-cdk/Dockerfile index a26feb5da..570d48235 100644 --- a/template/lambda-sqs-worker-cdk/Dockerfile +++ b/template/lambda-sqs-worker-cdk/Dockerfile @@ -5,7 +5,9 @@ FROM --platform=<%- platformName %> node:20-alpine AS dev-deps # Needed for cdk RUN apk add --no-cache bash -RUN corepack enable pnpm +RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir diff --git a/template/lambda-sqs-worker/.buildkite/pipeline.yml b/template/lambda-sqs-worker/.buildkite/pipeline.yml index 16ed08fec..e1c6a3963 100644 --- a/template/lambda-sqs-worker/.buildkite/pipeline.yml +++ b/template/lambda-sqs-worker/.buildkite/pipeline.yml @@ -12,6 +12,7 @@ configs: seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults cache-on: - .npmrc + - package.json - pnpm-lock.yaml secrets: id=npm,src=tmp/.npmrc diff --git a/template/lambda-sqs-worker/Dockerfile b/template/lambda-sqs-worker/Dockerfile index 2d717eb70..62cee15a9 100644 --- a/template/lambda-sqs-worker/Dockerfile +++ b/template/lambda-sqs-worker/Dockerfile @@ -2,7 +2,9 @@ FROM --platform=<%- platformName %> node:20-alpine AS dev-deps -RUN corepack enable pnpm +RUN --mount=type=bind,source=package.json,target=package.json \ + corepack enable pnpm + RUN pnpm config set store-dir /root/.pnpm-store WORKDIR /workdir