Skip to content

Commit

Permalink
chore: e2e build tag (#730)
Browse files Browse the repository at this point in the history
chore: set vanilla upgrade to run only when babylond is built with e2e tag
  • Loading branch information
RafilxTenfen authored Jul 29, 2024
1 parent 7abeb3d commit 671193e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ dockerNetworkList=$($(DOCKER) network ls --filter name=bbn-testnet --format {{.I
build-docker: ## Build babylond Docker image
$(MAKE) -C contrib/images babylond

build-docker-e2e: build-docker
build-docker-e2e:
$(MAKE) -C contrib/images babylond-e2e
$(MAKE) -C contrib/images babylond-before-upgrade
$(MAKE) -C contrib/images e2e-init-chain

Expand Down
8 changes: 2 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ import (
"github.com/spf13/cast"

"github.com/babylonchain/babylon/app/upgrades"
"github.com/babylonchain/babylon/app/upgrades/vanilla"
bbn "github.com/babylonchain/babylon/types"

appkeepers "github.com/babylonchain/babylon/app/keepers"
Expand Down Expand Up @@ -159,11 +158,8 @@ var (
}

// software upgrades and forks
// TODO: REMOVE UPGRADE BEFORE MAINNET, used for e2e testing
Upgrades = []upgrades.Upgrade{
vanilla.Upgrade,
}
Forks = []upgrades.Fork{}
Upgrades = []upgrades.Upgrade{}
Forks = []upgrades.Fork{}
)

func init() {
Expand Down
9 changes: 9 additions & 0 deletions app/e2e_include_upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build e2e

package app

import "github.com/babylonchain/babylon/app/upgrades/vanilla"

func init() {
Upgrades = append(Upgrades, vanilla.Upgrade)
}
4 changes: 4 additions & 0 deletions contrib/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ all: babylond cosmos-relayer
babylond: babylond-rmi
docker build --tag babylonchain/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH}

babylond-e2e: babylond-rmi
docker build --tag babylonchain/babylond -f babylond/Dockerfile ${BABYLON_FULL_PATH} \
--build-arg BUILD_TAGS="e2e"

babylond-before-upgrade:
docker rmi babylonchain/babylond-before-upgrade 2>/dev/null; true && \
docker build --tag babylonchain/babylond-before-upgrade -f babylond/Dockerfile \
Expand Down
1 change: 1 addition & 0 deletions contrib/images/babylond/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG VERSION
ARG LEDGER_ENABLED="false"
# Cosmos build options
ARG COSMOS_BUILD_OPTIONS=""
ARG BUILD_TAGS=""

# Install cli tools for building and final image
RUN apt-get update && apt-get install -y make git bash gcc curl jq
Expand Down

0 comments on commit 671193e

Please sign in to comment.