3 Star 0 Fork 1

易链天下/block

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 2.37 KB
一键复制 编辑 原始数据 按行查看 历史
chenyuanxin 提交于 2018-12-19 17:15 . fabric
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
language: go
go:
- 1.7
sudo: required
services:
- docker
env:
- TEST_TARGET=unit-test
- TEST_TARGET=behave
- TEST_TARGET=node-sdk-unit-tests
before_install:
- echo "Starting Docker Daemon "
- |
export TR_PULL_REQUEST="$TRAVIS_PULL_REQUEST" && export GIT_USER="$TRAVIS_REPO_SLUG"
USER_NAME="$(echo $GIT_USER | cut -d '/' -f 1)" && REPO_NAME="$(echo $GIT_USER | cut -d '/' -f 2)"
ip="$(ifconfig docker0 | grep "inet addr:" | awk '{print $2}' | cut -d ':' -f 2)"
port="$(ps -ef | grep docker | awk '{print $10}' | cut -d ':' -f 3 | cut -d '' -f 1)"
sudo stop docker
sudo docker daemon -H tcp://0.0.0.0:$port -H unix:///var/run/docker.sock >> dockerlogfile.log 2>&1 &
install:
- echo " INSTALLING DEPENDENCIES "
- |
cd $HOME/gopath/src/github.com/$USER_NAME/$REPO_NAME
git clone https://github.com/hyperledger/fabric-baseimage.git
cd $HOME/gopath/src/github.com/$USER_NAME/$REPO_NAME/fabric-baseimage/scripts/devenv && chmod +x setup.sh && sudo ./setup.sh
rm -rf ../../../fabric-baseimage
echo " Compilers & Dependencies "
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get -qq update && sudo apt-get -qq install g++-4.8 && sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
sudo apt-get install build-essential -y
sudo ldconfig
before_script:
- echo " CREATING BASE IMAGE "
- cd $HOME/gopath/src/github.com/$USER_NAME/$REPO_NAME/scripts && chmod +x foldercopy.sh && ./foldercopy.sh $TR_PULL_REQUEST $USER_NAME $REPO_NAME
- sudo rm -rf /var/hyperledger/ && sudo mkdir /var/hyperledger/ && sudo chown $USER:$USER /var/hyperledger
- cd /$HOME/gopath/src/github.com/hyperledger/fabric
- make linter
script:
- echo "Executing Tests"
- cd $HOME/gopath/src/github.com/hyperledger/fabric
- sed -i -e 's/172.17.0.1:2375\b/'"$ip:$port"'/g' $HOME/gopath/src/github.com/hyperledger/fabric/bddtests/compose-defaults.yml
- export BEHAVE_OPTS="-D logs=Y -o testsummary.log" #Defined to both jobs.
- make $TEST_TARGET
after_failure:
- |
echo "Click below links to view behave container log files"
cd $HOME/gopath/src/github.com/hyperledger/fabric
chmod +x scripts/containerlogs.sh
sudo ./scripts/containerlogs.sh
notifications:
slack: 'hyperledgerproject:azMP8Mw3cfGigXkqi5RujZXr'
on_success: always
on_failure: always
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/cyx19870323/block.git
git@gitee.com:cyx19870323/block.git
cyx19870323
block
block
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385