Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add version argument for e2e-initialization #54

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/images/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RELAYER_TAG := $(shell grep '^ENV RELAYER_TAG' cosmos-relayer/Dockerfile | cut -f3 -d\ )
BABYLON_FULL_PATH := $(shell git rev-parse --show-toplevel)
BABYLON_VERSION_BEFORE_UPGRADE ?= v0.9.1
BABYLON_VERSION_BEFORE_UPGRADE ?= v0.9.3

all: babylond cosmos-relayer

Expand All @@ -27,7 +27,7 @@ e2e-init-chain-rmi:

e2e-init-chain:
@DOCKER_BUILDKIT=1 docker build -t babylonlabs-io/babylond-e2e-init-chain --build-arg E2E_SCRIPT_NAME=chain --platform=linux/x86_64 \
-f e2e-initialization/init.Dockerfile ${BABYLON_FULL_PATH}
-f e2e-initialization/init.Dockerfile --build-arg VERSION="${BABYLON_VERSION_BEFORE_UPGRADE}" ${BABYLON_FULL_PATH}

e2e-init-chain-rmi:
docker rmi babylonlabs-io/babylond-e2e-init-chain 2>/dev/null; true
Expand Down
8 changes: 8 additions & 0 deletions contrib/images/e2e-initialization/init.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
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/

# Handle if version is set
RUN if [ -n "${VERSION}" ]; then \
git fetch origin tag ${VERSION} --no-tags; \
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
Expand Down
Loading