Skip to content

Commit 3bb7814

Browse files
committed
build: pull the besu image from its own target
Both evm suites inlined a docker inspect-or-pull. Give the image its own besu-docker-images target next to the fabric, monitoring and testing ones, have docker-images call it, and let the suites depend on it. Suggested by adecaro on #2159. Signed-off-by: atharrva01 <atharvaborade568@gmail.com>
1 parent 76e328b commit 3bb7814

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

Makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ unit-tests-regression:
8383
install-softhsm:
8484
./ci/scripts/install_softhsm.sh
8585

86+
# The EVM integration suites run against this Besu image.
87+
BESU_IMAGE ?= hyperledger/besu:24.3.0
88+
8689
.PHONY: docker-images
8790
# build/pull docker images needed for testing
88-
docker-images: fabric-docker-images monitoring-docker-images testing-docker-images
91+
docker-images: fabric-docker-images monitoring-docker-images testing-docker-images besu-docker-images
8992

9093
.PHONY: testing-docker-images
9194
# pull docker images for testing (postgres, vault)
@@ -102,6 +105,11 @@ fabric-docker-images:
102105
docker pull hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION)
103106
docker image tag hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION) hyperledger/fabric-ccenv:latest
104107

108+
.PHONY: besu-docker-images
109+
# pull the besu docker image the EVM integration suites run against
110+
besu-docker-images:
111+
docker pull $(BESU_IMAGE)
112+
105113
.PHONY: monitoring-docker-images
106114
# pull monitoring docker images (explorer, prometheus, grafana, jaeger)
107115
monitoring-docker-images:
@@ -111,21 +119,15 @@ monitoring-docker-images:
111119
docker pull grafana/grafana:latest
112120
docker pull cr.jaegertracing.io/jaegertracing/jaeger:2.12.0
113121

114-
# The EVM integration suite runs against this Besu image.
115-
BESU_IMAGE ?= hyperledger/besu:24.3.0
116-
117122
.PHONY: integration-tests-evm
118123
# run the fungible integration tests against an EVM backend (Besu).
119-
# Unlike the fabric suites this needs no FAB_BINS, but it does need docker and the besu image, which
120-
# it pulls if missing, plus forge to deploy the contracts.
121-
integration-tests-evm:
122-
docker image inspect $(BESU_IMAGE) >/dev/null 2>&1 || docker pull $(BESU_IMAGE)
124+
# Unlike the fabric suites this needs no FAB_BINS, but it does need docker and forge.
125+
integration-tests-evm: besu-docker-images
123126
cd ./integration/token/fungible/evm; ginkgo $(GINKGO_TEST_OPTS) .
124127

125128
.PHONY: integration-tests-evm-fabtoken
126129
# run the fungible integration tests against an EVM backend with the fabtoken driver.
127-
integration-tests-evm-fabtoken:
128-
docker image inspect $(BESU_IMAGE) >/dev/null 2>&1 || docker pull $(BESU_IMAGE)
130+
integration-tests-evm-fabtoken: besu-docker-images
129131
cd ./integration/token/fungible/evmfabtoken; ginkgo $(GINKGO_TEST_OPTS) .
130132

131133
.PHONY: integration-tests-nft-dlog

0 commit comments

Comments
 (0)