diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d94dc2c4..7f2b460c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: df -h - uses: actions/checkout@v3 - run: yarn global add tsx + - name: make Dockerfile + run: ./makeDockerfile.ts - name: build test images run: ./buildTestImages.ts - name: run test images diff --git a/.gitignore b/.gitignore index c6bba591..0696c1bd 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,6 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +# build in CI +Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c04f5a52..00000000 --- a/Dockerfile +++ /dev/null @@ -1,225 +0,0 @@ -#---------------- -# upgrade-8 -#---------------- - -## START -# on agoric-upgrade-7-2, with upgrade to agoric-upgrade-8 -FROM ghcr.io/agoric/ag0:agoric-upgrade-7-2 as prepare-upgrade-8 -ENV UPGRADE_TO=agoric-upgrade-8 THIS_NAME=agoric-upgrade-7-2 -RUN mkdir -p /usr/src/agoric-sdk/upgrade-test-scripts -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/start_ag0.sh ./upgrade-test-scripts/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ -# put env functions into shell environment -RUN echo '. /usr/src/agoric-sdk/upgrade-test-scripts/env_setup.sh' >> ~/.bashrc -SHELL ["/bin/bash", "-c"] -# this is the only layer that starts ag0 -RUN . ./upgrade-test-scripts/start_ag0.sh - - -# EXECUTE upgrade-8 -FROM ghcr.io/agoric/agoric-sdk:29 as execute-upgrade-8 -ENV THIS_NAME=agoric-upgrade-8 - -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=prepare-upgrade-8 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# USE upgrade-8 -FROM execute-upgrade-8 as use-upgrade-8 - -COPY ./proposals/package.json /usr/src/proposals/ -COPY --chmod=755 ./proposals/16:upgrade-8/* /usr/src/proposals/16:upgrade-8/ - -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/agoric-sdk/upgrade-test-scripts/ -# XXX for JS module resolution -# TODO get this out of agoric-sdk path -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/upgrade-test-scripts/ -# TODO remove network dependencies in stages -RUN cd /usr/src/upgrade-test-scripts/ && yarn install - -WORKDIR /usr/src/agoric-sdk/upgrade-test-scripts/ -RUN ./run_actions.sh 16:upgrade-8 -# no entrypoint; results of these actions are part of the image -SHELL ["/bin/bash", "-c"] - - -# TEST upgrade-8 -FROM use-upgrade-8 as test-upgrade-8 - -# XXX the test files were already copied in the "use" stage -# nothing to build, just an image for running tests -ENTRYPOINT ./run_tests.sh 16:upgrade-8 - -#---------------- -# upgrade-9 -#---------------- - -# PREPARE upgrade-9 -# upgrading to agoric-upgrade-9 -FROM ghcr.io/agoric/agoric-sdk:29 as prepare-upgrade-9 -ENV UPGRADE_TO=agoric-upgrade-9 -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=use-upgrade-8 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# EXECUTE upgrade-9 -FROM ghcr.io/agoric/agoric-sdk:31 as execute-upgrade-9 -ENV THIS_NAME=agoric-upgrade-9 - -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=prepare-upgrade-9 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# USE upgrade-9 -FROM execute-upgrade-9 as use-upgrade-9 - -COPY ./proposals/package.json /usr/src/proposals/ -COPY --chmod=755 ./proposals/29:upgrade-9/* /usr/src/proposals/29:upgrade-9/ - -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/agoric-sdk/upgrade-test-scripts/ -# XXX for JS module resolution -# TODO get this out of agoric-sdk path -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/upgrade-test-scripts/ -# TODO remove network dependencies in stages -RUN cd /usr/src/upgrade-test-scripts/ && yarn install - -WORKDIR /usr/src/agoric-sdk/upgrade-test-scripts/ -RUN ./run_actions.sh 29:upgrade-9 -# no entrypoint; results of these actions are part of the image -SHELL ["/bin/bash", "-c"] - - -# TEST upgrade-9 -FROM use-upgrade-9 as test-upgrade-9 - -# XXX the test files were already copied in the "use" stage -# nothing to build, just an image for running tests -ENTRYPOINT ./run_tests.sh 29:upgrade-9 - -#---------------- -# upgrade-10 -#---------------- - -# PREPARE upgrade-10 -# upgrading to agoric-upgrade-10 -FROM ghcr.io/agoric/agoric-sdk:31 as prepare-upgrade-10 -ENV UPGRADE_TO=agoric-upgrade-10 -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=use-upgrade-9 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# EXECUTE upgrade-10 -FROM ghcr.io/agoric/agoric-sdk:35 as execute-upgrade-10 -ENV THIS_NAME=agoric-upgrade-10 - -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=prepare-upgrade-10 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# USE upgrade-10 -FROM execute-upgrade-10 as use-upgrade-10 - -COPY ./proposals/package.json /usr/src/proposals/ -COPY --chmod=755 ./proposals/34:upgrade-10/* /usr/src/proposals/34:upgrade-10/ - -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/agoric-sdk/upgrade-test-scripts/ -# XXX for JS module resolution -# TODO get this out of agoric-sdk path -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/upgrade-test-scripts/ -# TODO remove network dependencies in stages -RUN cd /usr/src/upgrade-test-scripts/ && yarn install - -WORKDIR /usr/src/agoric-sdk/upgrade-test-scripts/ -RUN ./run_actions.sh 34:upgrade-10 -# no entrypoint; results of these actions are part of the image -SHELL ["/bin/bash", "-c"] - - -# TEST upgrade-10 -FROM use-upgrade-10 as test-upgrade-10 - -# XXX the test files were already copied in the "use" stage -# nothing to build, just an image for running tests -ENTRYPOINT ./run_tests.sh 34:upgrade-10 - -#---------------- -# upgrade-11 -#---------------- - -# PREPARE upgrade-11 -# upgrading to agoric-upgrade-11 -FROM ghcr.io/agoric/agoric-sdk:35 as prepare-upgrade-11 -ENV UPGRADE_TO=agoric-upgrade-11 -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=use-upgrade-10 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# EXECUTE upgrade-11 -FROM ghcr.io/agoric/agoric-sdk:36 as execute-upgrade-11 -ENV THIS_NAME=agoric-upgrade-11 - -WORKDIR /usr/src/agoric-sdk/ -COPY ./upgrade-test-scripts/env_setup.sh ./upgrade-test-scripts/start_to_to.sh ./upgrade-test-scripts/ - -COPY --from=prepare-upgrade-11 /root/.agoric /root/.agoric -RUN chmod +x ./upgrade-test-scripts/*.sh -SHELL ["/bin/bash", "-c"] -RUN . ./upgrade-test-scripts/start_to_to.sh - - -# USE upgrade-11 -FROM execute-upgrade-11 as use-upgrade-11 - -COPY ./proposals/package.json /usr/src/proposals/ -COPY --chmod=755 ./proposals/43:upgrade-11/* /usr/src/proposals/43:upgrade-11/ - -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/agoric-sdk/upgrade-test-scripts/ -# XXX for JS module resolution -# TODO get this out of agoric-sdk path -COPY --chmod=755 ./upgrade-test-scripts/*.* /usr/src/upgrade-test-scripts/ -# TODO remove network dependencies in stages -RUN cd /usr/src/upgrade-test-scripts/ && yarn install - -WORKDIR /usr/src/agoric-sdk/upgrade-test-scripts/ -RUN ./run_actions.sh 43:upgrade-11 -# no entrypoint; results of these actions are part of the image -SHELL ["/bin/bash", "-c"] - - -# TEST upgrade-11 -FROM use-upgrade-11 as test-upgrade-11 - -# XXX the test files were already copied in the "use" stage -# nothing to build, just an image for running tests -ENTRYPOINT ./run_tests.sh 43:upgrade-11