github.com/darrenli6/fabric-sdk-example@v0.0.0-20220109053535-94b13b56df8c/test/regression/release/run_byfn_cli_release_tests.sh (about) 1 #!/bin/bash 2 # 3 # Copyright IBM Corp. All Rights Reserved. 4 # 5 # SPDX-License-Identifier: Apache-2.0 6 # 7 8 # RUN BYFN Test 9 ##################### 10 11 CH_NAME="$1" 12 rm -rf ${GOPATH}/src/github.com/hyperledger/fabric-samples 13 14 WD="${GOPATH}/src/github.com/hyperledger/fabric-samples" 15 REPO_NAME=fabric-samples 16 17 git clone ssh://hyperledger-jobbuilder@gerrit.hyperledger.org:29418/$REPO_NAME $WD 18 cd $WD 19 20 curl -L https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap-1.0.0.sh -o bootstrap-1.0.0.sh 21 chmod +x bootstrap-1.0.0.sh 22 ./bootstrap-1.0.0.sh 23 24 cd $WD/first-network 25 export PATH=$WD/bin:$PATH 26 echo y | ./byfn.sh -m down 27 28 if [ -z "${CH_NAME}" ]; then 29 echo "Generating artifacts for default channel" 30 echo y | ./byfn.sh -m generate 31 echo "setting to default channel 'mychannel'" 32 echo y | ./byfn.sh -m up -t 10 33 echo 34 else 35 echo "Generate artifacts for custom Channel" 36 echo y | ./byfn.sh -m generate -c $CH_NAME 37 echo "Setting to non-default channel $CH_NAME" 38 echo y | ./byfn.sh -m up -c $CH_NAME -t 10 39 echo 40 fi 41 echo y | ./byfn.sh -m down