mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 09:05:10 +00:00
[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:
parent
403019e684
commit
965ed1fa84
8 changed files with 41 additions and 11 deletions
|
|
@ -21,6 +21,17 @@ jobs:
|
||||||
- template: install-fabric.yml
|
- template: install-fabric.yml
|
||||||
- template: fabcar-go.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
|
- job: fabcar_java
|
||||||
displayName: FabCar (Java)
|
displayName: FabCar (Java)
|
||||||
pool:
|
pool:
|
||||||
|
|
@ -75,6 +86,7 @@ jobs:
|
||||||
- template: install-deps.yml
|
- template: install-deps.yml
|
||||||
- template: install-fabric.yml
|
- template: install-fabric.yml
|
||||||
- template: commercialpaper-java.yml
|
- template: commercialpaper-java.yml
|
||||||
|
|
||||||
- job: commercialpaper_go
|
- job: commercialpaper_go
|
||||||
displayName: CommercialPaper (Go)
|
displayName: CommercialPaper (Go)
|
||||||
pool:
|
pool:
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ steps:
|
||||||
ls -l /usr/local/bin/peer
|
ls -l /usr/local/bin/peer
|
||||||
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
||||||
./network.sh down
|
./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.
|
# 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/"
|
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ steps:
|
||||||
ls -l /usr/local/bin/peer
|
ls -l /usr/local/bin/peer
|
||||||
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
||||||
./network.sh down
|
./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.
|
# 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/"
|
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ steps:
|
||||||
ls -l /usr/local/bin/peer
|
ls -l /usr/local/bin/peer
|
||||||
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C ..
|
||||||
./network.sh down
|
./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.
|
# 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/"
|
cp "./organizations/peerOrganizations/org1.example.com/connection-org1.yaml" "../commercial-paper/organization/digibank/gateway/"
|
||||||
|
|
|
||||||
15
ci/testnetwork.yml
Normal file
15
ci/testnetwork.yml
Normal 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
|
||||||
|
|
@ -21,7 +21,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
cd "${DIR}/../../../test-network"
|
cd "${DIR}/../../../test-network"
|
||||||
env | sort > /tmp/env.orig
|
env | sort > /tmp/env.orig
|
||||||
|
|
||||||
ORG="1"
|
OVERRIDE_ORG="1"
|
||||||
. ./scripts/envVar.sh
|
. ./scripts/envVar.sh
|
||||||
|
|
||||||
parsePeerConnectionParameters 1 2
|
parsePeerConnectionParameters 1 2
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
cd "${DIR}/../../../test-network"
|
cd "${DIR}/../../../test-network"
|
||||||
env | sort > /tmp/env.orig
|
env | sort > /tmp/env.orig
|
||||||
|
|
||||||
ORG="2"
|
OVERRIDE_ORG="2"
|
||||||
. ./scripts/envVar.sh
|
. ./scripts/envVar.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,22 +21,25 @@ setOrdererGlobals() {
|
||||||
|
|
||||||
# Set environment variables for the peer org
|
# Set environment variables for the peer org
|
||||||
setGlobals() {
|
setGlobals() {
|
||||||
if [ -z "$ORG" ]; then
|
local USING_ORG=""
|
||||||
ORG=$1
|
if [ -z "$OVERRIDE_ORG" ]; then
|
||||||
|
USING_ORG=$1
|
||||||
|
else
|
||||||
|
USING_ORG="${OVERRIDE_ORG}"
|
||||||
fi
|
fi
|
||||||
|
echo "Using organization ${USING_ORG}"
|
||||||
if [ $ORG -eq 1 ]; then
|
if [ $USING_ORG -eq 1 ]; then
|
||||||
export CORE_PEER_LOCALMSPID="Org1MSP"
|
export CORE_PEER_LOCALMSPID="Org1MSP"
|
||||||
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG1_CA
|
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_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
||||||
export CORE_PEER_ADDRESS=localhost:7051
|
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_LOCALMSPID="Org2MSP"
|
||||||
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA
|
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_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
|
||||||
export CORE_PEER_ADDRESS=localhost:9051
|
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_LOCALMSPID="Org3MSP"
|
||||||
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG3_CA
|
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
|
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue