Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit ff494fa

Browse files
committed
[FAB-6214] Make target to generate channel artifacts
Change-Id: I9da52a99b2e4a124dde7335f13df663caafda297 Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
1 parent 4bfb47e commit ff494fa

12 files changed

+42
-8
lines changed

Makefile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313
# checks: runs all check conditions (license, spelling, linting)
1414
# clean: stops docker conatainers used for integration testing
1515
# mock-gen: generate mocks needed for testing (using mockgen)
16+
# channel-artifacts: generates the channel configuration transactions and blocks used by tests
1617
# populate: populates generated files (not included in git) - currently only vendor
1718
# populate-vendor: populate the vendor directory based on the lock
18-
# populate-clean: cleans up populated files (might become part of clean eventually)
19+
# populate-clean: cleans up populated files (might become part of clean eventually)
1920
# thirdparty-pin: pulls (and patches) pinned dependencies into the project under internal
2021
#
21-
#
22-
# Instructions to generate .tx files used for creating channels:
23-
# Download the configtxgen binary for your OS from (it is located in the .tar.gz file):
24-
# https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric
25-
# Sample command: $ path/to/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx testchannel.tx -channelID testchannel
26-
# More Docs: http://hyperledger-fabric.readthedocs.io/en/latest/configtxgen.html
27-
#
2822

2923

3024
export ARCH=$(shell uname -m)
@@ -39,6 +33,10 @@ THIRDPARTY_FABRIC_CA_COMMIT=v1.0.1
3933
THIRDPARTY_FABRIC_BRANCH=master
4034
THIRDPARTY_FABRIC_COMMIT=a657db28a0ff53ed512bd6f4ac4786a0f4ca709c
4135

36+
# Local variables used by makefile
37+
PACKAGE_NAME=github.com/hyperledger/fabric-sdk-go
38+
FABRIC_TOOLS_RELEASE=1.0.1
39+
4240
# Detect CI
4341
ifdef JENKINS_URL
4442
export FABRIC_SDKGO_DEPEND_INSTALL=true
@@ -97,6 +95,13 @@ mock-gen:
9795
mockgen -build_flags '$(LDFLAGS)' github.com/hyperledger/fabric-sdk-go/api/apiconfig Config | sed "s/github.com\/hyperledger\/fabric-sdk-go\/vendor\///g" > api/apiconfig/mocks/mockconfig.gen.go
9896
mockgen -build_flags '$(LDFLAGS)' github.com/hyperledger/fabric-sdk-go/api/apifabca FabricCAClient | sed "s/github.com\/hyperledger\/fabric-sdk-go\/vendor\///g" > api/apifabca/mocks/mockfabriccaclient.gen.go
9997

98+
channel-artifacts:
99+
@echo "Generating test channel configuration transactions and blocks"
100+
@docker run -i \
101+
-v $(abspath .):/opt/gopath/src/$(PACKAGE_NAME) \
102+
hyperledger/fabric-tools:$(ARCH)-$(FABRIC_TOOLS_RELEASE) \
103+
/bin/bash -c "/opt/gopath/src/${PACKAGE_NAME}/test/scripts/generate_channeltx.sh"
104+
100105
thirdparty-pin:
101106
UPSTREAM_COMMIT=$(THIRDPARTY_FABRIC_COMMIT) UPSTREAM_BRANCH=$(THIRDPARTY_FABRIC_BRANCH) scripts/third_party_pins/fabric/apply_upstream.sh
102107
UPSTREAM_COMMIT=$(THIRDPARTY_FABRIC_CA_COMMIT) UPSTREAM_BRANCH=$(THIRDPARTY_FABRIC_CA_BRANCH) scripts/third_party_pins/fabric-ca/apply_upstream.sh

test/fixtures/channel/mychannel.tx

0 Bytes
Binary file not shown.
284 Bytes
Binary file not shown.
284 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
286 Bytes
Binary file not shown.
286 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
288 Bytes
Binary file not shown.
288 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)