Skip to content

Commit

Permalink
tilt: better cli-gen and const-gen scope
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Dec 20, 2024
1 parent be6f500 commit 59ca400
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@ def k8s_yaml_with_ns(objects):

docker_build(
ref = "cli-gen",
context = ".",
dockerfile = "Dockerfile.cli",
context = "clients/js",
dockerfile = "clients/js/Dockerfile",
ignore = ["build","node_modules"],
)

docker_build(
ref = "const-gen",
context = ".",
dockerfile = "Dockerfile.const",
build_args={"num_guardians": '%s' % (num_guardians)},
build_args = {"num_guardians": '%s' % (num_guardians)},
only = ["scripts", "ethereum/.env.test"]
)

# node
Expand Down
2 changes: 1 addition & 1 deletion aptos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ $(TARGETS):
$(foreach dir,$(CONTRACT_DIRS), make -C $(dir) $@ &&) true

test-docker:
DOCKER_BUILDKIT=1 docker build --progress plain -f ../Dockerfile.cli -t cli-gen ..
DOCKER_BUILDKIT=1 docker build --progress plain -f ../clients/js/Dockerfile -t cli-gen ../clients/js
DOCKER_BUILDKIT=1 docker build --build-arg num_guardians=1 --progress plain -f ../Dockerfile.const -t const-gen ..
DOCKER_BUILDKIT=1 docker build --progress plain -f Dockerfile --target tests .
2 changes: 2 additions & 0 deletions clients/js/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
node_modules
4 changes: 2 additions & 2 deletions Dockerfile.cli → clients/js/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
FROM node:18-alpine@sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 as cli-build

# Copy package.json & package-lock.json by themselves to create a cache layer
COPY clients/js/package.json clients/js/package-lock.json /clients/js/
COPY package.json package-lock.json /clients/js/

WORKDIR /clients/js

RUN npm ci

# Copy the rest of the source files, as a layer on top of the deps
COPY clients/js /clients/js
COPY . /clients/js

# Build CLI
RUN npm run build
Expand Down
2 changes: 1 addition & 1 deletion sui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ test:
$(foreach dir,$(TEST_CONTRACT_DIRS), make -C $(dir) $@ &&) true

test-docker:
DOCKER_BUILDKIT=1 docker build --progress plain -f ../Dockerfile.cli -t cli-gen ..
DOCKER_BUILDKIT=1 docker build --progress plain -f ../clients/js/Dockerfile -t cli-gen ../clients/js
DOCKER_BUILDKIT=1 docker build --build-arg num_guardians=1 --progress plain -f ../Dockerfile.const -t const-gen ..
DOCKER_BUILDKIT=1 docker build -f Dockerfile ..

0 comments on commit 59ca400

Please sign in to comment.