[FAB-17498] Beta Images removal, test test-network (#121)

Change 2.0.0-beta to 2.0.0 when CommercialPaper uses the test network
Add test network to the azure pipelines
Correct test network envvar script

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
This commit is contained in:
Matthew B White 2020-02-12 15:18:17 +00:00 committed by GitHub
parent 403019e684
commit 965ed1fa84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 11 deletions

View file

@ -21,6 +21,17 @@ jobs:
- template: install-fabric.yml
- template: fabcar-go.yml
- job: test_network
displayName: Start the test network
pool:
vmImage: ubuntu-18.04
dependsOn: []
timeoutInMinutes: 60
steps:
- template: install-deps.yml
- template: install-fabric.yml
- template: testnetwork.yml
- job: fabcar_java
displayName: FabCar (Java)
pool:
@ -75,6 +86,7 @@ jobs:
- template: install-deps.yml
- template: install-fabric.yml
- template: commercialpaper-java.yml
- job: commercialpaper_go
displayName: CommercialPaper (Go)
pool:

View file

@ -22,7 +22,7 @@ steps:
ls -l /usr/local/bin/peer
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
./network.sh down
./network.sh up createChannel -s couchdb -i 2.0.0-beta
./network.sh up createChannel -s couchdb -i 2.0.0
# Copy the connection profiles so they are in the correct organizations.
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"

View file

@ -17,7 +17,7 @@ steps:
ls -l /usr/local/bin/peer
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
./network.sh down
./network.sh up createChannel -s couchdb -i 2.0.0-beta
./network.sh up createChannel -s couchdb -i 2.0.0
# Copy the connection profiles so they are in the correct organizations.
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"

View file

@ -8,7 +8,7 @@ steps:
ls -l /usr/local/bin/peer
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
./network.sh down
./network.sh up createChannel -s couchdb -i 2.0.0-beta
./network.sh up createChannel -s couchdb -i 2.0.0
# Copy the connection profiles so they are in the correct organizations.
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"

15
ci/testnetwork.yml Normal file
View file

@ -0,0 +1,15 @@
#
# SPDX-License-Identifier: Apache-2.0
#
steps:
- script: |
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
./network.sh down
./network.sh up createChannel -s couchdb -i 2.0.0
./network.sh deployCC -l javascript
workingDirectory: test-network
displayName: Start up test network
env:
FABRIC_CFG_PATH: /usr/local/config

View file

@ -21,7 +21,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}/../../../test-network"
env | sort > /tmp/env.orig
ORG="1"
OVERRIDE_ORG="1"
. ./scripts/envVar.sh
parsePeerConnectionParameters 1 2

View file

@ -21,7 +21,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}/../../../test-network"
env | sort > /tmp/env.orig
ORG="2"
OVERRIDE_ORG="2"
. ./scripts/envVar.sh

View file

@ -21,22 +21,25 @@ setOrdererGlobals() {
# Set environment variables for the peer org
setGlobals() {
if [ -z "$ORG" ]; then
ORG=$1
local USING_ORG=""
if [ -z "$OVERRIDE_ORG" ]; then
USING_ORG=$1
else
USING_ORG="${OVERRIDE_ORG}"
fi
if [ $ORG -eq 1 ]; then
echo "Using organization ${USING_ORG}"
if [ $USING_ORG -eq 1 ]; then
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG1_CA
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=localhost:7051
elif [ $ORG -eq 2 ]; then
elif [ $USING_ORG -eq 2 ]; then
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
export CORE_PEER_ADDRESS=localhost:9051
elif [ $ORG -eq 3 ]; then
elif [ $USING_ORG -eq 3 ]; then
export CORE_PEER_LOCALMSPID="Org3MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG3_CA
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp