Skip to content

Commit 3832045

Browse files
committed
Build block-listener as a standard binary
It was inadvertently placed in build/docker/bin even though docker workflows were not consuming it. Lets make it a first class binary. Change-Id: I3b21a5ee38834e6a5f27c64b059a2447fb253d27 Signed-off-by: Gregory Haskins <[email protected]>
1 parent 1d8e305 commit 3832045

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ unit-test: peer-image gotools
8181
.PHONY: images
8282
images: $(patsubst %,build/image/%/.dummy, $(IMAGES))
8383

84-
behave-deps: images peer
84+
behave-deps: images peer build/bin/block-listener
8585
behave: behave-deps
8686
@echo "Running behave tests"
8787
@cd bddtests; behave $(BEHAVE_OPTS)
@@ -140,7 +140,12 @@ build/bin:
140140
# Both peer and peer-image depend on ccenv-image and javaenv-image (all docker env images it supports)
141141
build/bin/peer: build/image/ccenv/.dummy build/image/javaenv/.dummy
142142
build/image/peer/.dummy: build/image/ccenv/.dummy build/image/javaenv/.dummy
143-
build/image/peer/.dummy: build/docker/bin/examples/events/block-listener/
143+
144+
build/bin/block-listener:
145+
@mkdir -p $(@D)
146+
$(CGO_FLAGS) GOBIN=$(abspath $(@D)) go install $(PKGNAME)/examples/events/block-listener
147+
@echo "Binary available as $@"
148+
@touch $@
144149

145150
build/bin/%: build/image/base/.dummy $(PROJECT_FILES)
146151
@mkdir -p $(@D)
@@ -172,7 +177,7 @@ build/image/ccenv/.dummy: build/image/src/.dummy build/image/ccenv/bin/protoc-ge
172177
docker build -t $(PROJECT_NAME)-ccenv:latest $(@D)
173178
@touch $@
174179

175-
# Special override for java-image
180+
# Special override for java-image
176181
build/image/javaenv/.dummy: Makefile $(JAVASHIM_DEPS)
177182
@echo "Building docker javaenv-image"
178183
@mkdir -p $(@D)

bddtests/steps/peer_basic_impl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ def step_impl(context):
785785
def step_impl(context):
786786
gopath = os.environ.get('GOPATH')
787787
assert gopath is not None, "Please set GOPATH properly!"
788-
listener = os.path.join(gopath, "src/github.com/hyperledger/fabric/build/docker/bin/block-listener")
788+
listener = os.path.join(gopath, "src/github.com/hyperledger/fabric/build/bin/block-listener")
789789
assert os.path.isfile(listener), "Please build the block-listener binary!"
790790
bdd_test_util.start_background_process(context, "eventlistener", [listener, "-listen-to-rejections"] )
791791

0 commit comments

Comments
 (0)