Compare commits
10 Commits
master
...
oracle-ser
Author | SHA1 | Date | |
---|---|---|---|
|
322729ae82 | ||
|
636f053c48 | ||
|
80841a76a6 | ||
|
994562a8b9 | ||
|
b86090a5a0 | ||
|
a07cecccc2 | ||
|
8556e7aec5 | ||
|
441224c1f0 | ||
|
db11aa6444 | ||
|
d5e7e06788 |
@ -51,28 +51,25 @@ orbs:
|
|||||||
paths:
|
paths:
|
||||||
- ~/.cache/yarn
|
- ~/.cache/yarn
|
||||||
wait-for-oracle:
|
wait-for-oracle:
|
||||||
parameters:
|
|
||||||
redis-key:
|
|
||||||
type: string
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
|
||||||
name: Install redis tools
|
|
||||||
command: sudo apt-get install -y redis-tools
|
|
||||||
- run:
|
- run:
|
||||||
name: Wait for the Oracle to start
|
name: Wait for the Oracle to start
|
||||||
command: |
|
command: |
|
||||||
set +e
|
|
||||||
i=0
|
i=0
|
||||||
while [[ $(redis-cli GET << parameters.redis-key >> ) ]]; do
|
while :
|
||||||
((i++))
|
do
|
||||||
if [ "$i" -gt 30 ]
|
(echo > /dev/tcp/127.0.0.1/6379) >/dev/null 2>&1
|
||||||
then
|
if [[ $? -eq 0 ]]; then
|
||||||
exit -1
|
break
|
||||||
|
fi
|
||||||
|
((i++))
|
||||||
|
if [ "$i" -gt 30 ]; then
|
||||||
|
echo "Redis has not open the port"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Sleeping..."
|
echo "Sleeping..."
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
executors:
|
executors:
|
||||||
docker-node:
|
docker-node:
|
||||||
docker:
|
docker:
|
||||||
@ -225,9 +222,6 @@ jobs:
|
|||||||
scenario-name:
|
scenario-name:
|
||||||
description: "Molecule scenario name used to create the infrastructure"
|
description: "Molecule scenario name used to create the infrastructure"
|
||||||
type: string
|
type: string
|
||||||
redis-key:
|
|
||||||
description: "Redis key checked for non-emptiness to assert if Oracle is running"
|
|
||||||
type: string
|
|
||||||
ui-e2e-grep:
|
ui-e2e-grep:
|
||||||
description: "Mocha grep string used to run ui-e2e tests specific to given type of bridge"
|
description: "Mocha grep string used to run ui-e2e tests specific to given type of bridge"
|
||||||
default: ''
|
default: ''
|
||||||
@ -247,8 +241,7 @@ jobs:
|
|||||||
name: Prepare the infrastructure
|
name: Prepare the infrastructure
|
||||||
command: e2e-commons/up.sh deploy << parameters.scenario-name >> blocks
|
command: e2e-commons/up.sh deploy << parameters.scenario-name >> blocks
|
||||||
no_output_timeout: 50m
|
no_output_timeout: 50m
|
||||||
- tokenbridge-orb/wait-for-oracle:
|
- tokenbridge-orb/wait-for-oracle
|
||||||
redis-key: << parameters.redis-key >>
|
|
||||||
- when:
|
- when:
|
||||||
condition: << parameters.ui-e2e-grep >>
|
condition: << parameters.ui-e2e-grep >>
|
||||||
steps:
|
steps:
|
||||||
@ -297,25 +290,20 @@ workflows:
|
|||||||
- ultimate:
|
- ultimate:
|
||||||
name: "ultimate: native to erc"
|
name: "ultimate: native to erc"
|
||||||
scenario-name: native-to-erc
|
scenario-name: native-to-erc
|
||||||
redis-key: native-erc-collected-signatures:lastProcessedBlock
|
|
||||||
ui-e2e-grep: "NATIVE TO ERC"
|
ui-e2e-grep: "NATIVE TO ERC"
|
||||||
- ultimate:
|
- ultimate:
|
||||||
name: "ultimate: erc to native"
|
name: "ultimate: erc to native"
|
||||||
scenario-name: erc-to-native
|
scenario-name: erc-to-native
|
||||||
redis-key: erc-native-collected-signatures:lastProcessedBlock
|
|
||||||
ui-e2e-grep: "ERC TO NATIVE"
|
ui-e2e-grep: "ERC TO NATIVE"
|
||||||
- ultimate:
|
- ultimate:
|
||||||
name: "ultimate: erc to erc"
|
name: "ultimate: erc to erc"
|
||||||
scenario-name: erc-to-erc
|
scenario-name: erc-to-erc
|
||||||
redis-key: erc-erc-collected-signatures:lastProcessedBlock
|
|
||||||
ui-e2e-grep: "ERC TO ERC"
|
ui-e2e-grep: "ERC TO ERC"
|
||||||
- ultimate:
|
- ultimate:
|
||||||
name: "ultimate: amb"
|
name: "ultimate: amb"
|
||||||
scenario-name: amb
|
scenario-name: amb
|
||||||
redis-key: amb-collected-signatures:lastProcessedBlock
|
|
||||||
oracle-e2e-script: "amb"
|
oracle-e2e-script: "amb"
|
||||||
- ultimate:
|
- ultimate:
|
||||||
name: "ultimate: amb stake erc to erc"
|
name: "ultimate: amb stake erc to erc"
|
||||||
scenario-name: ultimate-amb-stake-erc-to-erc
|
scenario-name: ultimate-amb-stake-erc-to-erc
|
||||||
redis-key: amb-collected-signatures:lastProcessedBlock
|
|
||||||
ui-e2e-grep: "AMB-STAKE-ERC-TO-ERC"
|
ui-e2e-grep: "AMB-STAKE-ERC-TO-ERC"
|
||||||
|
@ -24,3 +24,10 @@
|
|||||||
copy:
|
copy:
|
||||||
content: "{{ docker_compose_parsed | to_yaml }}"
|
content: "{{ docker_compose_parsed | to_yaml }}"
|
||||||
dest: "/home/poadocker/bridge/oracle/{{ file }}.yml"
|
dest: "/home/poadocker/bridge/oracle/{{ file }}.yml"
|
||||||
|
|
||||||
|
- name: Get updated docker file
|
||||||
|
shell: cat "/home/poadocker/bridge/oracle/{{ file }}.yml"
|
||||||
|
register: catout
|
||||||
|
|
||||||
|
- debug: var=catout.stdout_lines
|
||||||
|
|
||||||
|
@ -3,9 +3,30 @@
|
|||||||
hosts: oracle
|
hosts: oracle
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: get statuses for docker containers
|
||||||
|
shell: docker ps -a
|
||||||
|
register: docker1out
|
||||||
|
|
||||||
|
- debug: var=docker1out.stdout_lines
|
||||||
|
|
||||||
|
- name: get status for poabridge
|
||||||
|
shell: /etc/init.d/poabridge status
|
||||||
|
register: serviceout
|
||||||
|
|
||||||
|
- debug: var=serviceout.stdout_lines
|
||||||
|
|
||||||
- name: stop the service
|
- name: stop the service
|
||||||
shell: service poabridge stop
|
shell: service poabridge stop
|
||||||
|
|
||||||
|
- name: force to stop redis and rabit
|
||||||
|
shell: docker rm -f oracle_rabbit_1 oracle_redis_1 || true
|
||||||
|
|
||||||
|
- name: get statuses for docker containers
|
||||||
|
shell: docker ps -a
|
||||||
|
register: docker2out
|
||||||
|
|
||||||
|
- debug: var=docker2out.stdout_lines
|
||||||
|
|
||||||
- name: Build current oracle image
|
- name: Build current oracle image
|
||||||
shell: docker build -t oracle:ultimate-testing --file oracle/Dockerfile .
|
shell: docker build -t oracle:ultimate-testing --file oracle/Dockerfile .
|
||||||
delegate_to: 127.0.0.1
|
delegate_to: 127.0.0.1
|
||||||
@ -32,4 +53,14 @@
|
|||||||
loop_var: file
|
loop_var: file
|
||||||
|
|
||||||
- name: start the service
|
- name: start the service
|
||||||
shell: service poabridge start
|
#shell: service poabridge start
|
||||||
|
shell: /etc/init.d/poabridge start
|
||||||
|
register: startout
|
||||||
|
|
||||||
|
- debug: var=startout.stdout_lines
|
||||||
|
|
||||||
|
- name: get statuses for docker containers
|
||||||
|
shell: docker ps -a
|
||||||
|
register: docker3out
|
||||||
|
|
||||||
|
- debug: var=docker3out.stdout_lines
|
||||||
|
@ -3,4 +3,6 @@ version: '2.4'
|
|||||||
services:
|
services:
|
||||||
monitor:
|
monitor:
|
||||||
image: poanetwork/tokenbridge-monitor
|
image: poanetwork/tokenbridge-monitor
|
||||||
build: .
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: monitor/Dockerfile
|
||||||
|
Loading…
Reference in New Issue
Block a user