Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
e4fed205
Commit
e4fed205
authored
Nov 14, 2018
by
madengji
Committed by
33cn
Nov 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add stage
parent
366b1b8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
.travis.yml
.travis.yml
+12
-2
docker-compose.sh
build/docker-compose.sh
+1
-1
testcase.sh
plugin/dapp/relay/cmd/build/testcase.sh
+4
-3
No files found.
.travis.yml
View file @
e4fed205
...
@@ -53,6 +53,15 @@ jobs:
...
@@ -53,6 +53,15 @@ jobs:
env
:
env
:
-
DOCKER_COMPOSE_VERSION=1.21.2
-
DOCKER_COMPOSE_VERSION=1.21.2
install
:
skip
install
:
skip
before_script
:
make build_ci
script
:
script
:
-
make docker-compose PROJ=paracross DAPP=paracross && make docker-compose-down PROJ=paracross DAPP=paracross
-
make docker-compose DAPP=paracross && make docker-compose-down DAPP=paracross
-
stage
:
deploy-relay
sudo
:
required
services
:
-
docker
env
:
-
DOCKER_COMPOSE_VERSION=1.21.2
install
:
skip
script
:
-
make docker-compose DAPP=relay && make docker-compose-down DAPP=relay && make clean
\ No newline at end of file
build/docker-compose.sh
View file @
e4fed205
...
@@ -201,7 +201,7 @@ function block_wait() {
...
@@ -201,7 +201,7 @@ function block_wait() {
fi
fi
cur_height
=
$(${
1
}
block last_header | jq
".height"
)
cur_height
=
$(${
1
}
block last_header | jq
".height"
)
expect
=
$((
cur_height
+
${
2
}))
expect
=
$((
cur_height
+
${
2
}))
count
=
0
local
count
=
0
while
true
;
do
while
true
;
do
new_height
=
$(${
1
}
block last_header | jq
".height"
)
new_height
=
$(${
1
}
block last_header | jq
".height"
)
if
[
"
${
new_height
}
"
-ge
"
${
expect
}
"
]
;
then
if
[
"
${
new_height
}
"
-ge
"
${
expect
}
"
]
;
then
...
...
plugin/dapp/relay/cmd/build/testcase.sh
View file @
e4fed205
...
@@ -44,7 +44,7 @@ function relay_config() {
...
@@ -44,7 +44,7 @@ function relay_config() {
# [WRN] BTCW: Can't listen on [::1]:18554: listen tcp6 [::1]:18554: bind: cannot assign requested address
# [WRN] BTCW: Can't listen on [::1]:18554: listen tcp6 [::1]:18554: bind: cannot assign requested address
# shellcheck disable=SC2068
# shellcheck disable=SC2068
function
wait_btcd_up
()
{
function
wait_btcd_up
()
{
count
=
20
local
count
=
20
while
[
$count
-gt
0
]
;
do
while
[
$count
-gt
0
]
;
do
status
=
$(
docker-compose ps |
grep
btcd |
awk
'{print $5}'
)
status
=
$(
docker-compose ps |
grep
btcd |
awk
'{print $5}'
)
if
[
"
${
status
}
"
==
"Up"
]
;
then
if
[
"
${
status
}
"
==
"Up"
]
;
then
...
@@ -77,7 +77,7 @@ function wait_btc_height() {
...
@@ -77,7 +77,7 @@ function wait_btc_height() {
echo
"wrong wait_btc_height params"
echo
"wrong wait_btc_height params"
exit
1
exit
1
fi
fi
count
=
100
local
count
=
100
wait_sec
=
0
wait_sec
=
0
while
[
$count
-gt
0
]
;
do
while
[
$count
-gt
0
]
;
do
cur
=
$(${
1
}
relay btc_cur_height | jq
".curHeight"
)
cur
=
$(${
1
}
relay btc_cur_height | jq
".curHeight"
)
...
@@ -361,9 +361,10 @@ function relay_test() {
...
@@ -361,9 +361,10 @@ function relay_test() {
echo
"=========== # wait relayd verify order ======="
echo
"=========== # wait relayd verify order ======="
## for relayd verify tick 5s
## for relayd verify tick 5s
block_wait
"
${
1
}
"
3
block_wait
"
${
1
}
"
3
# sleep 10
echo
"=========== # check finish order ============="
echo
"=========== # check finish order ============="
count
=
30
local
count
=
30
while
true
;
do
while
true
;
do
id
=
$(${
1
}
relay status
-s
4 | jq
-sr
'.[] | select(.coinoperation=="buy")|.orderid'
)
id
=
$(${
1
}
relay status
-s
4 | jq
-sr
'.[] | select(.coinoperation=="buy")|.orderid'
)
if
[
"
${
id
}
"
==
"
${
realbuy_id
}
"
]
;
then
if
[
"
${
id
}
"
==
"
${
realbuy_id
}
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment