Skip to content

Commit

Permalink
[FAB-6305] Pass Go Tags to docker integration test
Browse files Browse the repository at this point in the history
Change-Id: Ie5cc8db1075f345863f84257be41cd5fa36e8fab
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Sep 27, 2017
1 parent 293fb2b commit 585d166
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
50 changes: 25 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,47 @@
# thirdparty-pin: pulls (and patches) pinned dependencies into the project under internal
#

# Tool commands
# Tool commands (overridable)
GO_CMD ?= go
GO_DEP_CMD ?= dep
DOCKER_CMD ?= docker
DOCKER_COMPOSE_CMD ?= docker-compose

# Build flags
ARCH := $(shell uname -m)
GO_LDFLAGS ?= -ldflags=-s
EXPERIMENTAL ?= true # includes experimental features in the tests
BRANCHFAB ?= false # requires testing against fabric with cherry picks from gerrit

ifeq ($(EXPERIMENTAL),true)
GO_TAGS += experimental
endif

ifeq ($(BRANCHFAB),true)
GO_TAGS += branchfab
endif

# Upstream fabric patching
THIRDPARTY_FABRIC_CA_BRANCH ?= release
THIRDPARTY_FABRIC_CA_COMMIT ?= v1.0.2
THIRDPARTY_FABRIC_BRANCH ?= master
THIRDPARTY_FABRIC_COMMIT ?= a657db28a0ff53ed512bd6f4ac4786a0f4ca709c
# Build flags (overridable)
GO_LDFLAGS ?= -ldflags=-s
FABRIC_SDK_EXPERIMENTAL ?= true
FABRIC_SDK_EXTRA_GO_TAGS ?=

# Tool versions
GO_DEP_COMMIT := v0.3.0 # the version of dep that will be installed by depend-install (or in the CI)
# Fabric tool versions (overridable)
FABRIC_TOOLS_VERSION ?= 1.0.1
FABRIC_BASE_VERSION ?= 0.3.1

# Fabric Base Docker Image
# Fabric base docker image (overridable)
FABRIC_BASE_IMAGE ?= hyperledger/fabric-baseimage
FABRIC_BASE_TAG ?= $(ARCH)-$(FABRIC_BASE_VERSION)

# Fabric Tools Docker Image
# Fabric tools docker image (overridable)
FABRIC_TOOLS_IMAGE ?= hyperledger/fabric-tools
FABRIC_TOOLS_TAG ?= $(ARCH)-$(FABRIC_TOOLS_VERSION)

# Upstream fabric patching (overridable)
THIRDPARTY_FABRIC_CA_BRANCH ?= release
THIRDPARTY_FABRIC_CA_COMMIT ?= v1.0.2
THIRDPARTY_FABRIC_BRANCH ?= master
THIRDPARTY_FABRIC_COMMIT ?= a657db28a0ff53ed512bd6f4ac4786a0f4ca709c

# Local variables used by makefile
PACKAGE_NAME=github.com/hyperledger/fabric-sdk-go
PACKAGE_NAME := github.com/hyperledger/fabric-sdk-go
ARCH := $(shell uname -m)

# The version of dep that will be installed by depend-install (or in the CI)
GO_DEP_COMMIT := v0.3.0

# Setup Go Tags
GO_TAGS := $(FABRIC_SDK_EXTRA_GO_TAGS)
ifeq ($(FABRIC_SDK_EXPERIMENTAL),true)
GO_TAGS += experimental
endif

# Detect CI
ifdef JENKINS_URL
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/docker-compose-nopkcs11-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
fabric-sdk-integration-tests:
container_name: fabric-sdk-integration-test
image: ${FABRIC_BASEOS_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BASEOS_FIXTURE_TAG}
environment:
- GO_TAGS
volumes:
- ../../:/opt/gopath/src/github.com/hyperledger/fabric-sdk-go
command: /opt/gopath/src/github.com/hyperledger/fabric-sdk-go/test/scripts/integration.sh
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/docker-compose-pkcs11-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
image: softhsm2-image
environment:
- FABRIC_SDK_CLIENT_BCCSP_SECURITY_DEFAULT_PROVIDER=PKCS11
- GO_TAGS
volumes:
- ../../:/opt/gopath/src/github.com/hyperledger/fabric-sdk-go
command: /opt/gopath/src/github.com/hyperledger/fabric-sdk-go/test/scripts/integration.sh
Expand Down

0 comments on commit 585d166

Please sign in to comment.