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

Commit 4cb70e8

Browse files
committed
[FAB-4754] Set correct arch for test containers
Change-Id: Idc5f19a37649fa795ff48d3d0ae4232b48bb341d Signed-off-by: Divyank Katira <Divyank.Katira@securekey.com>
1 parent 5923ca4 commit 4cb70e8

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

test/fixtures/.env

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
# Fabric fixtures. The images and tags can be overridden using environment
99
# variables. See docker compose documentation.
1010

11-
FABRIC_CA_FIXTURE_TAG=x86_64-1.0.0-beta
12-
FABRIC_ORDERER_FIXTURE_TAG=x86_64-1.0.0-beta
13-
FABRIC_PEER_FIXTURE_TAG=x86_64-1.0.0-beta
14-
FABRIC_COUCHDB_FIXTURE_TAG=x86_64-1.0.0-beta
15-
FABRIC_BUILDER_FIXTURE_TAG=x86_64-1.0.0-beta
11+
# Default architecture
12+
ARCH=x86_64
13+
14+
FABRIC_CA_FIXTURE_TAG=1.0.0-beta
15+
FABRIC_ORDERER_FIXTURE_TAG=1.0.0-beta
16+
FABRIC_PEER_FIXTURE_TAG=1.0.0-beta
17+
FABRIC_COUCHDB_FIXTURE_TAG=1.0.0-beta
18+
FABRIC_BUILDER_FIXTURE_TAG=1.0.0-beta
1619

1720
FABRIC_CA_FIXTURE_IMAGE=hyperledger/fabric-ca
1821
FABRIC_ORDERER_FIXTURE_IMAGE=hyperledger/fabric-orderer

test/fixtures/docker-compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: '2'
77

88
services:
99
ca0:
10-
image: ${FABRIC_CA_FIXTURE_IMAGE}:${FABRIC_CA_FIXTURE_TAG}
10+
image: ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
1111
environment:
1212
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
1313
- FABRIC_CA_SERVER_CA_NAME=ca-org1
@@ -25,7 +25,7 @@ services:
2525
container_name: ca_peerOrg1
2626

2727
ca1:
28-
image: ${FABRIC_CA_FIXTURE_IMAGE}:${FABRIC_CA_FIXTURE_TAG}
28+
image: ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
2929
environment:
3030
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
3131
- FABRIC_CA_SERVER_CA_NAME=ca-org2
@@ -44,7 +44,7 @@ services:
4444

4545
orderer.example.com:
4646
container_name: orderer.example.com
47-
image: ${FABRIC_ORDERER_FIXTURE_IMAGE}:${FABRIC_ORDERER_FIXTURE_TAG}
47+
image: ${FABRIC_ORDERER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_ORDERER_FIXTURE_TAG}
4848
environment:
4949
- ORDERER_GENERAL_LOGLEVEL=debug
5050
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
@@ -68,7 +68,7 @@ services:
6868

6969
peer0.org1.example.com:
7070
container_name: peer0.org1.example.com
71-
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${FABRIC_PEER_FIXTURE_TAG}
71+
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
7272
environment:
7373
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
7474
- CORE_PEER_ID=peer0.org1.example.com
@@ -100,7 +100,7 @@ services:
100100

101101
peer0.org2.example.com:
102102
container_name: peer0.org2.example.com
103-
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${FABRIC_PEER_FIXTURE_TAG}
103+
image: ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
104104
environment:
105105
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
106106
- CORE_PEER_ID=peer0.org2.example.com
@@ -130,4 +130,4 @@ services:
130130

131131
# builder is only here to create a dependency on the image (not used as part of compose)
132132
builder:
133-
image: ${FABRIC_BUILDER_FIXTURE_IMAGE}:${FABRIC_BUILDER_FIXTURE_TAG}
133+
image: ${FABRIC_BUILDER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BUILDER_FIXTURE_TAG}

test/scripts/integration.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
# SPDX-License-Identifier: Apache-2.0
66
#
77

8+
export ARCH=`uname -m`
9+
810
# Packages to include in test run
911
PKGS=`go list github.com/hyperledger/fabric-sdk-go/test/integration/... 2> /dev/null | \
1012
grep -v /vendor/`
1113

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

0 commit comments

Comments
 (0)