Commit e4fed205 authored by madengji's avatar madengji Committed by 33cn

add stage

parent 366b1b8e
...@@ -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
...@@ -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
......
...@@ -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
......
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