Commit 6f571bde authored by harrylee's avatar harrylee Committed by vipwzw

modify scripts for CI

parent eb14177d
...@@ -4,6 +4,7 @@ pipeline { ...@@ -4,6 +4,7 @@ pipeline {
environment { environment {
GOPATH = "${WORKSPACE}" GOPATH = "${WORKSPACE}"
GO111MODULE = "on"
PROJ_DIR = "${WORKSPACE}/src/github.com/33cn/plugin" PROJ_DIR = "${WORKSPACE}/src/github.com/33cn/plugin"
} }
...@@ -21,6 +22,7 @@ pipeline { ...@@ -21,6 +22,7 @@ pipeline {
steps { steps {
dir("${PROJ_DIR}"){ dir("${PROJ_DIR}"){
gitlabCommitStatus(name: 'deploy'){ gitlabCommitStatus(name: 'deploy'){
sh 'go version'
sh 'make build_ci' sh 'make build_ci'
sh "cd build && mkdir ${env.BUILD_NUMBER} && cp ci/* ${env.BUILD_NUMBER} -r && ./docker-compose-pre.sh modify && cp chain33* Dockerfile* docker* *.sh ${env.BUILD_NUMBER}/ && cd ${env.BUILD_NUMBER}/ && ./docker-compose-pre.sh run ${env.BUILD_NUMBER} all " sh "cd build && mkdir ${env.BUILD_NUMBER} && cp ci/* ${env.BUILD_NUMBER} -r && ./docker-compose-pre.sh modify && cp chain33* Dockerfile* docker* *.sh ${env.BUILD_NUMBER}/ && cd ${env.BUILD_NUMBER}/ && ./docker-compose-pre.sh run ${env.BUILD_NUMBER} all "
} }
......
...@@ -4,6 +4,7 @@ pipeline { ...@@ -4,6 +4,7 @@ pipeline {
environment { environment {
GOPATH = "${WORKSPACE}" GOPATH = "${WORKSPACE}"
GO111MODULE = "on"
PROJ_DIR = "${WORKSPACE}/src/github.com/33cn/plugin" PROJ_DIR = "${WORKSPACE}/src/github.com/33cn/plugin"
} }
......
...@@ -5,12 +5,14 @@ set -o pipefail ...@@ -5,12 +5,14 @@ set -o pipefail
#set -o verbose #set -o verbose
#set -o xtrace #set -o xtrace
CHAIN33_PATH=$1
sedfix="" sedfix=""
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
sedfix=".bak" sedfix=".bak"
fi fi
echo "=====chain33_path: ${CHAIN33_PATH} ========"
AutoTestMain="../../vendor/github.com/33cn/chain33/cmd/autotest/main.go" AutoTestMain="${CHAIN33_PATH}/cmd/autotest/main.go"
ImportPlugin='"github.com/33cn/plugin/plugin"' ImportPlugin='"github.com/33cn/plugin/plugin"'
function build_auto_test() { function build_auto_test() {
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
// para-exec addr on para 16zsMh7mvNDKPG6E9NVrPhw6zL93gWsTpR // para-exec addr on para 16zsMh7mvNDKPG6E9NVrPhw6zL93gWsTpR
var ( var (
Amount = int64(1 * types.Coin) Amount = types.Coin
) )
func para_init(title string) { func para_init(title string) {
......
...@@ -266,7 +266,7 @@ func BenchmarkMemSet(b *testing.B) { ...@@ -266,7 +266,7 @@ func BenchmarkMemSet(b *testing.B) {
key = GetRandomString(MaxKeylenth) key = GetRandomString(MaxKeylenth)
value = fmt.Sprintf("v%d", i) value = fmt.Sprintf("v%d", i)
keys = append(keys, []byte(key)) keys = append(keys, []byte(key))
kv = append(kv, &types.KeyValue{Key: []byte(string(key)), Value: []byte(string(value))}) kv = append(kv, &types.KeyValue{Key: []byte(key), Value: []byte(value)})
} }
datas := &types.StoreSet{ datas := &types.StoreSet{
StateHash: drivers.EmptyRoot[:], StateHash: drivers.EmptyRoot[:],
...@@ -298,8 +298,8 @@ func BenchmarkCommit(b *testing.B) { ...@@ -298,8 +298,8 @@ func BenchmarkCommit(b *testing.B) {
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
key = GetRandomString(MaxKeylenth) key = GetRandomString(MaxKeylenth)
value = fmt.Sprintf("v%d", i) value = fmt.Sprintf("v%d", i)
keys = append(keys, []byte(string(key))) keys = append(keys, []byte(key))
kv = append(kv, &types.KeyValue{Key: []byte(string(key)), Value: []byte(string(value))}) kv = append(kv, &types.KeyValue{Key: []byte(key), Value: []byte(value)})
} }
datas := &types.StoreSet{ datas := &types.StoreSet{
StateHash: drivers.EmptyRoot[:], StateHash: drivers.EmptyRoot[:],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment