Skip to content

Commit

Permalink
feat: copy 'test' dir only in TEST stage
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jan 14, 2025
1 parent 042c5ba commit 383df33
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/synthetic-chain/src/cli/dockerfileGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ENV \
UPGRADE_INFO=${JSON.stringify(encodeUpgradeInfo(upgradeInfo))} \
SKIP_PROPOSAL_VALIDATION=${skipProposalValidation}
COPY --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --exclude=test --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --link --chmod=755 ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/run_prepare.sh ./upgrade-test-scripts/start_to_to.sh /usr/src/upgrade-test-scripts/
WORKDIR /usr/src/upgrade-test-scripts
SHELL ["/bin/bash", "-c"]
Expand All @@ -100,7 +100,7 @@ FROM ghcr.io/agoric/agoric-sdk:${sdkImageTag} as execute-${proposalName}
WORKDIR /usr/src/upgrade-test-scripts
# base is a fresh sdk image so set up the proposal and its dependencies
COPY --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --exclude=test --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --link --chmod=755 ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/run_execute.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/install_deps.sh /usr/src/upgrade-test-scripts/
RUN --mount=type=cache,target=/root/.yarn ./install_deps.sh ${path}
Expand All @@ -122,7 +122,7 @@ RUN ./run_execute.sh ${planName}
# EVAL ${proposalName}
FROM use-${lastProposal.proposalName} as eval-${proposalName}
COPY --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --exclude=test --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
WORKDIR /usr/src/upgrade-test-scripts
Expand Down Expand Up @@ -168,6 +168,8 @@ ENTRYPOINT ./start_agd.sh
# TEST ${proposalName}
FROM use-${proposalName} as test-${proposalName}
COPY --link --chmod=755 ./proposals/${path}/test /usr/src/proposals/${path}/test
WORKDIR /usr/src/upgrade-test-scripts
COPY --link --chmod=755 ./upgrade-test-scripts/run_test.sh /usr/src/upgrade-test-scripts/
Expand Down

0 comments on commit 383df33

Please sign in to comment.