Skip to content

Commit

Permalink
[FAB-4754] Set correct arch for test containers
Browse files Browse the repository at this point in the history
Change-Id: Idc5f19a37649fa795ff48d3d0ae4232b48bb341d
Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
  • Loading branch information
d1vyank committed Jun 21, 2017
1 parent 5923ca4 commit 4cb70e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
13 changes: 8 additions & 5 deletions test/fixtures/.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
# Fabric fixtures. The images and tags can be overridden using environment
# variables. See docker compose documentation.

FABRIC_CA_FIXTURE_TAG=x86_64-1.0.0-beta
FABRIC_ORDERER_FIXTURE_TAG=x86_64-1.0.0-beta
FABRIC_PEER_FIXTURE_TAG=x86_64-1.0.0-beta
FABRIC_COUCHDB_FIXTURE_TAG=x86_64-1.0.0-beta
FABRIC_BUILDER_FIXTURE_TAG=x86_64-1.0.0-beta
# Default architecture
ARCH=x86_64

FABRIC_CA_FIXTURE_TAG=1.0.0-beta
FABRIC_ORDERER_FIXTURE_TAG=1.0.0-beta
FABRIC_PEER_FIXTURE_TAG=1.0.0-beta
FABRIC_COUCHDB_FIXTURE_TAG=1.0.0-beta
FABRIC_BUILDER_FIXTURE_TAG=1.0.0-beta

FABRIC_CA_FIXTURE_IMAGE=hyperledger/fabric-ca
FABRIC_ORDERER_FIXTURE_IMAGE=hyperledger/fabric-orderer
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '2'

services:
ca0:
image: ${FABRIC_CA_FIXTURE_IMAGE}:${FABRIC_CA_FIXTURE_TAG}
image: ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org1
Expand All @@ -25,7 +25,7 @@ services:
container_name: ca_peerOrg1

ca1:
image: ${FABRIC_CA_FIXTURE_IMAGE}:${FABRIC_CA_FIXTURE_TAG}
image: ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org2
Expand All @@ -44,7 +44,7 @@ services:

orderer.example.com:
container_name: orderer.example.com
image: ${FABRIC_ORDERER_FIXTURE_IMAGE}:${FABRIC_ORDERER_FIXTURE_TAG}
image: ${FABRIC_ORDERER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_ORDERER_FIXTURE_TAG}
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
Expand All @@ -68,7 +68,7 @@ services:

peer0.org1.example.com:
container_name: peer0.org1.example.com
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${FABRIC_PEER_FIXTURE_TAG}
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
Expand Down Expand Up @@ -100,7 +100,7 @@ services:

peer0.org2.example.com:
container_name: peer0.org2.example.com
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${FABRIC_PEER_FIXTURE_TAG}
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org2.example.com
Expand Down Expand Up @@ -130,4 +130,4 @@ services:

# builder is only here to create a dependency on the image (not used as part of compose)
builder:
image: ${FABRIC_BUILDER_FIXTURE_IMAGE}:${FABRIC_BUILDER_FIXTURE_TAG}
image: ${FABRIC_BUILDER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BUILDER_FIXTURE_TAG}
6 changes: 4 additions & 2 deletions test/scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
# SPDX-License-Identifier: Apache-2.0
#

export ARCH=`uname -m`

# Packages to include in test run
PKGS=`go list github.com/hyperledger/fabric-sdk-go/test/integration/... 2> /dev/null | \
grep -v /vendor/`

# Detect Hyperledger CI environment
if [ "$JENKINS_URL" == "https://jenkins.hyperledger.org/" ] && [ "$USE_PREBUILT_IMAGES" == true ]
if [ "$JENKINS_URL" == "https://jenkins.hyperledger.org/" ] && [ "$USE_PREBUILT_IMAGES" == false ]
then
echo "In Hyperledger CI - Setting docker integration fixture tags to latest and using pre-built images..."
echo "In Hyperledger CI - Setting docker integration fixture tags to latest and using commits specified in test/scripts/fabric_test_commitlevel.sh..."
source ./test/fixtures/latest-env.sh
fi

Expand Down

0 comments on commit 4cb70e8

Please sign in to comment.