diff --git a/contrib/images/Makefile b/contrib/images/Makefile index 47febc890..fd419edd5 100644 --- a/contrib/images/Makefile +++ b/contrib/images/Makefile @@ -40,4 +40,20 @@ cosmos-relayer: cosmos-relayer-rmi cosmos-relayer-rmi: docker rmi babylonlabs-io/cosmos-relayer 2>/dev/null; true -.PHONY: all babylond babylond-before-upgrade cosmos-relayer e2e-init-chain babylond-rmi babylond-rmi-upgrade cosmos-relayer-rmi +build-ibcsim-bcd: + docker build --tag babylonlabs-io/ibcsim-bcd -f bcd/Dockerfile ${BABYLON_FULL_PATH} + +ibcsim-bcd-rmi: + docker rmi babylonlabs-io/ibcsim-bcd 2>/dev/null; true + +build-integration-test: babylond build-ibcsim-bcd + +start-integration-test: stop-integration-test + bcd/pre-deployment.sh + docker compose -f bcd/docker-compose.yml up -d + +stop-integration-test: + docker compose -f bcd/docker-compose.yml down + rm -rf bcd/.testnets + +.PHONY: all babylond babylond-before-upgrade cosmos-relayer e2e-init-chain babylond-rmi babylond-rmi-upgrade cosmos-relayer-rmi build-ibcsim-bcd ibcsim-bcd-rmi build-integration-test start-integration-test stop-integration-test diff --git a/test/e2e/bcd_integration/Dockerfile b/contrib/images/bcd/Dockerfile similarity index 88% rename from test/e2e/bcd_integration/Dockerfile rename to contrib/images/bcd/Dockerfile index ae890c89e..d1969b793 100644 --- a/test/e2e/bcd_integration/Dockerfile +++ b/contrib/images/bcd/Dockerfile @@ -53,10 +53,10 @@ COPY --from=build-env /go/bin/rly /usr/bin/rly COPY --from=build-env /go/bin/bcd /usr/bin/bcd WORKDIR /ibcsim-bcd -COPY consumer/wrapper.sh /ibcsim-bcd/wrapper.sh -COPY consumer/setup-bcd.sh /ibcsim-bcd/setup-bcd.sh -COPY bytecode/babylon_contract.wasm /ibcsim-bcd/babylon_contract.wasm -COPY bytecode/btc_staking.wasm /ibcsim-bcd/btc_staking.wasm +COPY contrib/images/bcd/wrapper.sh /ibcsim-bcd/wrapper.sh +COPY contrib/images/bcd/setup-bcd.sh /ibcsim-bcd/setup-bcd.sh +COPY test/e2e/bytecode/babylon_contract.wasm /ibcsim-bcd/babylon_contract.wasm +COPY test/e2e/bytecode/btc_staking.wasm /ibcsim-bcd/btc_staking.wasm ENV BABYLON_HOME=/data/node1/babylond ENV BABYLON_NODE_RPC="http://babylondnode1:26657" diff --git a/test/e2e/bcd_integration/docker-compose.yml b/contrib/images/bcd/docker-compose.yml similarity index 100% rename from test/e2e/bcd_integration/docker-compose.yml rename to contrib/images/bcd/docker-compose.yml diff --git a/test/e2e/bcd_integration/pre-deployment.sh b/contrib/images/bcd/pre-deployment.sh similarity index 97% rename from test/e2e/bcd_integration/pre-deployment.sh rename to contrib/images/bcd/pre-deployment.sh index f1079e6fe..85a9a68af 100755 --- a/test/e2e/bcd_integration/pre-deployment.sh +++ b/contrib/images/bcd/pre-deployment.sh @@ -17,4 +17,4 @@ docker run --rm -v $(pwd)/.testnets:/data babylonlabs-io/babylond \ --covenant-pks "bb50e2d89a4ed70663d080659fe0ad4b9bc3e06c17a227433966cb59ceee020d" # should be updated if `covenant-keyring` dir is changed` # Create separate subpaths for each component and copy relevant configuration -chmod -R 777 .testnets +chmod -R 777 .testnets \ No newline at end of file diff --git a/test/e2e/bcd_integration/setup-bcd.sh b/contrib/images/bcd/setup-bcd.sh similarity index 100% rename from test/e2e/bcd_integration/setup-bcd.sh rename to contrib/images/bcd/setup-bcd.sh diff --git a/test/e2e/bcd_integration/wrapper.sh b/contrib/images/bcd/wrapper.sh similarity index 100% rename from test/e2e/bcd_integration/wrapper.sh rename to contrib/images/bcd/wrapper.sh diff --git a/test/e2e/bcd_integration/Makefile b/test/e2e/bcd_integration/Makefile deleted file mode 100644 index a215d8f41..000000000 --- a/test/e2e/bcd_integration/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -DOCKER := $(shell which docker) -GIT_TOPLEVEL := $(shell git rev-parse --show-toplevel) - -.PHONY: build-ibcsim-bcd build-babylond build-integration-test start-integration-test stop-integration-test - -build-ibcsim-bcd: - cd $(GIT_TOPLEVEL)/test/e2e && \ - $(DOCKER) build --no-cache --tag babylonlabs-io/ibcsim-bcd -f consumer/Dockerfile . - -build-babylond: - $(MAKE) -C $(GIT_TOPLEVEL)/contrib/images babylond - -build-integration-test: build-babylond build-ibcsim-bcd - -start-integration-test: stop-integration-test - ./pre-deployment.sh - $(DOCKER) compose -f docker-compose.yml up -d - -stop-integration-test: - $(DOCKER) compose -f docker-compose.yml down - rm -rf $(CURDIR)/.testnets