Skip to content

Commit 0fda88f

Browse files
geroplona-agent
andcommitted
Fix dev/image build by adding leeway dependency for npm-tools
Create leeway generic build for dev/npm-tools and use it as a dependency in dev/image:docker build. This resolves the build error where npm-tools files were not accessible during Docker build. Changes: - Add dev/npm-tools/BUILD.yaml with generic package containing package.json and package-lock.json - Add dev/npm-tools:pkg as dependency in dev/image/BUILD.yaml - Update Dockerfile to use COPY from leeway dependency path (dev-npm-tools--pkg/) This follows the established pattern used in other builds like install/installer where dependencies are copied from leeway-generated paths. Co-authored-by: Ona <no-reply@ona.com>
1 parent e3f8cf6 commit 0fda88f

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

dev/image/BUILD.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ packages:
44
deps:
55
- dev/gpctl:app
66
- dev/kubecdl:app
7+
- dev/npm-tools:pkg
78
argdeps:
89
- imageRepoBase
910
srcs:

dev/image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ RUN sudo rm -f /usr/bin/npx /usr/local/bin/npx /home/gitpod/.nvm/versions/node/v
143143
sudo chmod +x /usr/local/bin/npx
144144

145145
# Install npm-tools with locked dependencies
146-
COPY dev/npm-tools/package.json dev/npm-tools/package-lock.json /opt/npm-tools/
146+
COPY dev-npm-tools--pkg/package.json dev-npm-tools--pkg/package-lock.json /opt/npm-tools/
147147
RUN cd /opt/npm-tools && \
148148
npm ci && \
149149
for bin in /opt/npm-tools/node_modules/.bin/*; do \

dev/npm-tools/BUILD.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
packages:
2+
- name: pkg
3+
type: generic
4+
srcs:
5+
- "package.json"
6+
- "package-lock.json"
7+
config:
8+
commands:
9+
- ["echo", "npm-tools package files"]

0 commit comments

Comments
 (0)