Compare commits
18 commits
master
...
feature/py
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bad6a8ac6 | ||
|
|
e3bf6b9553 | ||
|
|
75d2e19455 | ||
|
|
46e0d033fb | ||
|
|
5cf9d2900a | ||
|
|
149d2876d5 | ||
|
|
d093584016 | ||
|
|
c33a20384a | ||
|
|
ae23e37375 | ||
|
|
a874806f09 | ||
|
|
fc3b66a0a1 | ||
|
|
f6532efa74 | ||
|
|
aef6129bf3 | ||
|
|
b5a2b84558 | ||
|
|
943e02cdcd | ||
|
|
e8d74f65d3 | ||
|
|
76e8cdf750 | ||
|
|
98933a6f86 |
2 changed files with 60 additions and 11 deletions
|
|
@ -6,9 +6,10 @@ include:
|
|||
- template: Secret-Detection.gitlab-ci.yml
|
||||
|
||||
stages:
|
||||
- python-test
|
||||
- dockerize
|
||||
- build
|
||||
- test
|
||||
- dockerize
|
||||
|
||||
build-mainnet:
|
||||
stage: build
|
||||
|
|
@ -29,6 +30,8 @@ build-mainnet:
|
|||
- build/tests/
|
||||
tags:
|
||||
- builder
|
||||
when:
|
||||
manual
|
||||
|
||||
test-mainnet:
|
||||
stage: test
|
||||
|
|
@ -49,18 +52,62 @@ dockerize-mainnet:
|
|||
before_script:
|
||||
- docker info
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
- df -BM $pwd
|
||||
script:
|
||||
- docker images
|
||||
- docker builder prune -a -f
|
||||
- docker build --no-cache -t $IMAGE .
|
||||
- docker images
|
||||
- docker push $IMAGE
|
||||
after_script:
|
||||
- docker rmi $IMAGE
|
||||
- docker images
|
||||
tags:
|
||||
- builder
|
||||
when:
|
||||
manual
|
||||
timeout:
|
||||
3h
|
||||
|
||||
test-e2e:
|
||||
stage: python-test
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker stop $(docker ps -a -q)
|
||||
- docker rm $(docker ps -aq)
|
||||
- git clone https://gitlab.com/PBSA/tools-libs/peerplays-utils.git
|
||||
- pwd
|
||||
- cd peerplays-utils/peerplays-qa-environment
|
||||
- FULL_PWD=$(pwd)
|
||||
- cd e2e-tests/
|
||||
- python3 -m venv venv
|
||||
- source venv/bin/activate
|
||||
- pip3 install -r requirements.txt
|
||||
- docker ps -a -q
|
||||
- python3 main.py --stop
|
||||
- docker ps -a -q
|
||||
- python3 main.py --start btc hive eth
|
||||
- docker ps -a -q
|
||||
- python3 -m pytest test_btc_init_state.py test_hive_inital_state.py
|
||||
- docker pull registry.gitlab.com/pbsa/peerplays/mainnet/feature-python-e2e-tests:943e02cdcd9fb8a90137851635b998cf1b4f622c
|
||||
- ls -la $FULL_PWD/peerplays/config.ini
|
||||
- ls -la $FULL_PWD/peerplays/genesis.json
|
||||
- ls -la $FULL_PWD/peerplays/init-network.sh
|
||||
- PP_CONTAINER_ID=$(docker run --name pp -d registry.gitlab.com/pbsa/peerplays/mainnet/feature-python-e2e-tests:943e02cdcd9fb8a90137851635b998cf1b4f622c tail -f /dev/null)
|
||||
- docker cp $FULL_PWD/e2e-tests/peerplays-utils/peerplays-qa-environment/peerplays/config.ini $PP_CONTAINER_ID:/home/peerplays/peerplays-network/witness_node_data_dir/config.ini
|
||||
- docker cp $FULL_PWD/e2e-tests/peerplays-utils/peerplays-qa-environment/peerplays/genensis.json $PP_CONTAINER_ID:/home/peerplays/peerplays-network/witness_node_data_dir/genensis.json
|
||||
- docker cp $FULL_PWD/e2e-tests/peerplays-utils/peerplays-qa-environment/peerplays/init-network.sh $PP_CONTAINER_ID:/home/peerplays/peerplays-network/init-network.sh
|
||||
- docker exec -c pp ./init-network.sh
|
||||
- docker ps -a -q
|
||||
- docker exec pp sh -c ./witness_node -d ./witness_node_data_dir --replay-blockchain
|
||||
- docker exec pp sh -c ./init-network.sh
|
||||
- python3 -m pytest test_pp_inital_state.py
|
||||
- ./main.py --stop
|
||||
- deactivate
|
||||
- docker ps -a -q
|
||||
tags:
|
||||
- python-tests
|
||||
|
||||
build-testnet:
|
||||
stage: build
|
||||
script:
|
||||
|
|
|
|||
18
Dockerfile
18
Dockerfile
|
|
@ -50,8 +50,14 @@ RUN echo 'peerplays:peerplays' | chpasswd
|
|||
# SSH
|
||||
EXPOSE 22
|
||||
|
||||
RUN \
|
||||
df -h -BM $pwd
|
||||
|
||||
WORKDIR /home/peerplays/src
|
||||
|
||||
RUN \
|
||||
df -h -BM $pwd
|
||||
|
||||
#===============================================================================
|
||||
# Boost setup
|
||||
#===============================================================================
|
||||
|
|
@ -133,6 +139,9 @@ RUN \
|
|||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libsodium-dev
|
||||
|
||||
RUN \
|
||||
df -h -BM $pwd
|
||||
|
||||
RUN \
|
||||
git clone https://github.com/libbitcoin/libbitcoin-build.git && \
|
||||
cd libbitcoin-build && \
|
||||
|
|
@ -190,11 +199,9 @@ ADD . peerplays
|
|||
RUN \
|
||||
cd peerplays && \
|
||||
git submodule update --init --recursive && \
|
||||
git symbolic-ref --short HEAD && \
|
||||
git log --oneline -n 5 && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_PEERPLAYS_TESTNET=1 ..
|
||||
|
||||
# Build Peerplays
|
||||
RUN \
|
||||
|
|
@ -208,9 +215,6 @@ RUN \
|
|||
ln -s /home/peerplays/src/peerplays/build/programs/cli_wallet/cli_wallet ./ && \
|
||||
ln -s /home/peerplays/src/peerplays/build/programs/witness_node/witness_node ./
|
||||
|
||||
RUN ./witness_node --create-genesis-json genesis.json && \
|
||||
rm genesis.json
|
||||
|
||||
RUN chown peerplays:root -R /home/peerplays/peerplays-network
|
||||
|
||||
# Peerplays RPC
|
||||
|
|
@ -218,5 +222,3 @@ EXPOSE 8090
|
|||
# Peerplays P2P:
|
||||
EXPOSE 9777
|
||||
|
||||
# Peerplays
|
||||
CMD ["./witness_node", "-d", "./witness_node_data_dir"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue