Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
add fabric-evm job test steps (scripts/ci.sh)
Browse files Browse the repository at this point in the history
  • Loading branch information
CruzMolina committed Aug 21, 2019
1 parent 885e1b2 commit 6be7a80
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,35 @@ elif [ "$QUORUM" = true ]; then
sleep 90
lerna run --scope truffle test --stream -- --exit

elif [ "$FABRICEVM" = true ]; then

root=$(pwd)
sudo add-apt-repository -y ppa:rmescandon/yq
sudo apt update
sudo apt install -y yq
cd $GOPATH
mkdir -p src/github.com/hyperledger
cd src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric-chaincode-evm
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.4.1
cd fabric-samples/first-network
yq w -i docker-compose-cli.yaml "services.cli.volumes[+]" "./../../fabric-chaincode-evm:/opt/gopath/src/github.com/hyperledger/fabric-chaincode-evm"
yes Y | ./byfn.sh up
docker exec -it cli sh -c "peer chaincode install -n evmcc -l golang -v 0 -p github.com/hyperledger/fabric-chaincode-evm/evmcc &&
peer chaincode instantiate -n evmcc -v 0 -C mychannel -c '{\"Args\":[]}' -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"
cd ../../fabric-chaincode-evm
make fab3
# Environment Variables for Fab3:
export FAB3_CONFIG=${GOPATH}/src/github.com/hyperledger/fabric-chaincode-evm/examples/first-network-sdk-config.yaml
export FAB3_USER=User1
export FAB3_ORG=Org1
export FAB3_CHANNEL=mychannel
export FAB3_CCID=evmcc
export FAB3_PORT=5000
bin/fab3 &>/dev/null &
cd $root
lerna run --scope truffle test --stream -- --exit

elif [ "$PACKAGES" = true ]; then

docker pull ethereum/solc:0.4.22
Expand Down

0 comments on commit 6be7a80

Please sign in to comment.