Browse Source

Test pygnunetrest using docker and gitlab CI

master
juga 1 year ago
parent
commit
4cea94f1fa
3 changed files with 50 additions and 0 deletions
  1. +14
    -0
      .gitlab-ci.yml
  2. +29
    -0
      docker-compose.yml
  3. +7
    -0
      docker/gnunet.conf

+ 14
- 0
.gitlab-ci.yml View File

@ -30,3 +30,17 @@ build:
- setup.py
- tests
test-docker:
script:
- apk add --no-cache py-pip gcc libffi-dev openssl-dev libc-dev make python3-dev
- pip install docker-compose
- docker-compose up -d
- sleep 3
# XXX: when there is an official gnunet image that works, replace this
# See https://bugs.gnunet.org/view.php?id=6628
- docker pull registry.gitlab.com/juga0/gnunet:latest
- docker pull $RELEASE_IMAGE || true
- mkdir -p tmp
- cp docker/gnunet.conf tmp/
- docker-compose up -d
- docker exec gnunetrest pytest-3 tests

+ 29
- 0
docker-compose.yml View File

@ -0,0 +1,29 @@
version: "3"
services:
gnunet:
build:
context: .
image: registry.gitlab.com/juga0/gnunet:latest
container_name: gnunet
# Copy a gnunet.conf that enable REST in all interfaces into ./tmp
volumes:
- ./tmp:/home/gnunet/.config
# expose REST port to gnunetrest container
expose:
- 7776
restart: unless-stopped
gnunetrest:
build:
context: .
image: ${RELEASE_IMAGE:-gnunet-docker}
environment:
- HOST=gnunet
command: pytest-3 tests
container_name: gnunetrest
volumes:
- .:/home/gnunet/pygnunetrest
restart: unless-stopped
depends_on:
- gnunet

+ 7
- 0
docker/gnunet.conf View File

@ -0,0 +1,7 @@
[rest]
BIND_TO = 0.0.0.0
BIND_TO6 = ::
# IMMEDIATE_START = YES
# HTTP_PORT = 7771
# RUN_PER_USER = YES

Loading…
Cancel
Save