Skip to content

Commit

Permalink
add .npmrc mounts (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
samchungy committed Feb 7, 2024
1 parent 8ad4565 commit 634350b
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 5 deletions.
4 changes: 3 additions & 1 deletion template/express-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ configs:

- &docker-ecr-cache
seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults
cache-on: pnpm-lock.yaml
cache-on:
- .npmrc
- pnpm-lock.yaml
dockerfile: Dockerfile.dev-deps
secrets: id=npm,src=tmp/.npmrc

Expand Down
1 change: 1 addition & 0 deletions template/express-rest-api/Dockerfile.dev-deps
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN pnpm config set store-dir /root/.pnpm-store
WORKDIR /workdir

RUN --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=bind,source=.npmrc,target=.npmrc \
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
pnpm fetch
4 changes: 3 additions & 1 deletion template/greeter/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ configs:

- &docker-ecr-cache
seek-oss/docker-ecr-cache#v2.1.1:
cache-on: pnpm-lock.yaml
cache-on:
- .npmrc
- pnpm-lock.yaml
secrets: id=npm,src=tmp/.npmrc

- &private-npm
Expand Down
1 change: 1 addition & 0 deletions template/greeter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN pnpm config set store-dir /root/.pnpm-store
WORKDIR /workdir

RUN --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=bind,source=.npmrc,target=.npmrc \
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
pnpm fetch
4 changes: 3 additions & 1 deletion template/koa-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ configs:

- &docker-ecr-cache
seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults
cache-on: pnpm-lock.yaml
cache-on:
- .npmrc
- pnpm-lock.yaml
dockerfile: Dockerfile.dev-deps
secrets: id=npm,src=tmp/.npmrc

Expand Down
1 change: 1 addition & 0 deletions template/koa-rest-api/Dockerfile.dev-deps
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN pnpm config set store-dir /root/.pnpm-store
WORKDIR /workdir

RUN --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=bind,source=.npmrc,target=.npmrc \
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
pnpm fetch
4 changes: 3 additions & 1 deletion template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ configs:

- &docker-ecr-cache
seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults
cache-on: pnpm-lock.yaml
cache-on:
- .npmrc
- pnpm-lock.yaml
secrets: id=npm,src=tmp/.npmrc

- &private-npm
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker-cdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ RUN pnpm config set store-dir /root/.pnpm-store
WORKDIR /workdir

RUN --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=bind,source=.npmrc,target=.npmrc \
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
pnpm fetch
4 changes: 3 additions & 1 deletion template/lambda-sqs-worker/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ configs:

- &docker-ecr-cache
seek-oss/docker-ecr-cache#v2.1.1: &docker-ecr-cache-defaults
cache-on: pnpm-lock.yaml
cache-on:
- .npmrc
- pnpm-lock.yaml
secrets: id=npm,src=tmp/.npmrc

- &private-npm
Expand Down
1 change: 1 addition & 0 deletions template/lambda-sqs-worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ RUN pnpm config set store-dir /root/.pnpm-store
WORKDIR /workdir

RUN --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=bind,source=.npmrc,target=.npmrc \
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
pnpm fetch

0 comments on commit 634350b

Please sign in to comment.