Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -75,6 +86,7 @@ jobs:
- template: install-deps.yml
- template: install-fabric.yml
- template: commercialpaper-java.yml

- job: commercialpaper_go
displayName: CommercialPaper (Go)
pool:
Expand Down
2 changes: 1 addition & 1 deletion ci/commercialpaper-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion ci/commercialpaper-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion ci/commercialpaper-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
15 changes: 15 additions & 0 deletions ci/testnetwork.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion commercial-paper/organization/digibank/digibank.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion commercial-paper/organization/magnetocorp/magnetocorp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
15 changes: 9 additions & 6 deletions test-network/scripts/envVar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down