-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e-init-chain, it is necessary for e2e testing in new releases to have the init chain with the same proto versions used at the v09 bin
- Loading branch information
1 parent
0aa61b2
commit 009cd29
Showing
14 changed files
with
212 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
RELAYER_TAG := $(shell grep '^ENV RELAYER_TAG' cosmos-relayer/Dockerfile | cut -f3 -d\ ) | ||
BABYLON_FULL_PATH := $(shell git rev-parse --show-toplevel) | ||
|
||
all: babylond cosmos-relayer | ||
|
||
babylond: babylond-rmi | ||
docker build --tag babylonlabs-io/babylond -f babylond/Dockerfile \ | ||
$(shell git rev-parse --show-toplevel) | ||
docker build --tag babylonlabs-io/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH} | ||
|
||
babylond-e2e: | ||
docker build --tag babylonlabs-io/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH} \ | ||
--build-arg BUILD_TAGS="e2e" | ||
|
||
babylond-rmi: | ||
docker rmi babylonlabs-io/babylond 2>/dev/null; true | ||
|
||
e2e-init-chain-rmi: | ||
docker rmi babylonlabs-io/babylond-e2e-init-chain --force 2>/dev/null; true | ||
|
||
e2e-init-chain: | ||
docker build -t babylonlabs-io/babylond-e2e-init-chain --build-arg E2E_SCRIPT_NAME=chain \ | ||
-f e2e-initialization/init.Dockerfile ${BABYLON_FULL_PATH} | ||
|
||
cosmos-relayer: cosmos-relayer-rmi | ||
docker build --tag babylonlabs-io/cosmos-relayer:${RELAYER_TAG} -f cosmos-relayer/Dockerfile \ | ||
$(shell git rev-parse --show-toplevel)/contrib/images/cosmos-relayer | ||
${BABYLON_FULL_PATH}/contrib/images/cosmos-relayer | ||
docker tag babylonlabs-io/cosmos-relayer:${RELAYER_TAG} babylonlabs-io/cosmos-relayer:latest | ||
|
||
cosmos-relayer-rmi: | ||
docker rmi babylonlabs-io/cosmos-relayer 2>/dev/null; true | ||
|
||
.PHONY: all babylond cosmos-relayer babylond-rmi cosmos-relayer-rmi | ||
.PHONY: all babylond cosmos-relayer babylond-e2e e2e-init-chain e2e-init-chain-rmi babylond-rmi cosmos-relayer-rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM golang:1.21 as build-env | ||
|
||
ARG E2E_SCRIPT_NAME | ||
# Version to build. Default is empty | ||
ARG VERSION | ||
|
||
# Copy All | ||
WORKDIR /go/src/github.com/babylonlabs-io/babylon | ||
COPY ./ /go/src/github.com/babylonlabs-io/babylon/ | ||
|
||
# If version is set, then checkout this version | ||
RUN if [ -n "${VERSION}" ]; then \ | ||
git checkout -f ${VERSION}; \ | ||
fi | ||
|
||
RUN LEDGER_ENABLED=false LINK_STATICALLY=false E2E_SCRIPT_NAME=${E2E_SCRIPT_NAME} make e2e-build-script | ||
|
||
FROM debian:bookworm-slim AS wasm-link | ||
|
||
RUN apt-get update && apt-get install -y wget bash | ||
|
||
# Label should match your github repo | ||
LABEL org.opencontainers.image.source="https://github.com/babylonlabs-io/babylond:${VERSION}" | ||
|
||
# Install libraries | ||
# Cosmwasm - Download correct libwasmvm version | ||
COPY --from=build-env /go/src/github.com/babylonlabs-io/babylon/go.mod /tmp | ||
RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm /tmp/go.mod | cut -d' ' -f2) && \ | ||
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$(uname -m).so \ | ||
-O /lib/libwasmvm.$(uname -m).so && \ | ||
# verify checksum | ||
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \ | ||
sha256sum /lib/libwasmvm.$(uname -m).so | grep $(cat /tmp/checksums.txt | grep libwasmvm.$(uname -m) | cut -d ' ' -f 1) | ||
RUN rm -f /tmp/go.mod | ||
|
||
# Args only last for a single build stage - renew | ||
ARG E2E_SCRIPT_NAME | ||
|
||
COPY --from=build-env /go/src/github.com/babylonlabs-io/babylon/build/${E2E_SCRIPT_NAME} /bin/${E2E_SCRIPT_NAME} | ||
|
||
# Docker ARGs are not expanded in ENTRYPOINT in the exec mode. At the same time, | ||
# it is impossible to add CMD arguments when running a container in the shell mode. | ||
# As a workaround, we create the entrypoint.sh script to bypass these issues. | ||
RUN echo "#!/bin/bash\n${E2E_SCRIPT_NAME} \"\$@\"" >> entrypoint.sh && chmod +x entrypoint.sh | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.