2019-04-12 18:21:11 +00:00
|
|
|
---
|
|
|
|
priviliged: true
|
2019-04-12 07:38:33 +00:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
steps:
|
2019-04-12 18:21:11 +00:00
|
|
|
- name: test
|
|
|
|
image: python:3
|
2019-04-12 07:31:39 +00:00
|
|
|
commands:
|
2019-04-12 18:21:11 +00:00
|
|
|
- pip install -U pip
|
|
|
|
- pip install mypy flake8 black
|
|
|
|
# - black --check .
|
|
|
|
- flake8 activitypub.py
|
|
|
|
- mypy --ignore-missing-imports .
|
2019-04-11 20:35:52 +00:00
|
|
|
|
2019-04-12 07:38:33 +00:00
|
|
|
- name: build
|
2019-04-12 07:31:39 +00:00
|
|
|
image: docker:dind
|
|
|
|
environment:
|
2019-04-12 07:40:43 +00:00
|
|
|
DOCKER_HOST: tcp://docker:2375
|
2019-04-12 07:31:39 +00:00
|
|
|
commands:
|
2019-04-12 18:21:11 +00:00
|
|
|
- apk update && apk upgrade && apk add --no-cache bash git openssh curl
|
|
|
|
- git clone https://github.com/tsileo/poussetaches.git pt && cd pt && docker build . -t poussetaches:latest && cd - && rm -rf pt
|
|
|
|
- docker network create fede
|
|
|
|
- docker pull mongo
|
|
|
|
- docker build . -t microblogpub:latest
|
|
|
|
|
|
|
|
- name: poussetaches
|
|
|
|
image: docker:dind
|
|
|
|
detach: true
|
|
|
|
environment:
|
|
|
|
DOCKER_HOST: tcp://docker:2375
|
|
|
|
POUSSETACHES_AUTH_KEY: lol
|
|
|
|
commands:
|
|
|
|
- docker run -p 7991:7991 --net fede -e POUSSETACHES_AUTH_KEY --name poussetaches poussetaches
|
2019-04-12 07:48:32 +00:00
|
|
|
|
2019-04-12 18:21:11 +00:00
|
|
|
- name: mongo
|
|
|
|
image: docker:dind
|
|
|
|
detach: true
|
2019-04-12 07:48:32 +00:00
|
|
|
environment:
|
|
|
|
DOCKER_HOST: tcp://docker:2375
|
|
|
|
commands:
|
2019-04-12 18:21:11 +00:00
|
|
|
- docker run -p 27017:27017 --net fede --name mongo mongo
|
2019-04-12 07:48:32 +00:00
|
|
|
|
2019-04-12 18:21:11 +00:00
|
|
|
- name: microblogpub_instance1
|
2019-04-12 07:31:39 +00:00
|
|
|
image: docker:dind
|
|
|
|
detach: true
|
|
|
|
environment:
|
2019-04-12 07:40:43 +00:00
|
|
|
DOCKER_HOST: tcp://docker:2375
|
2019-04-12 18:21:11 +00:00
|
|
|
MICROBLOGPUB_DEBUG: 1
|
|
|
|
MICROBLOGPUB_HOSTNAME: instance1_web
|
|
|
|
MICROBLOGPUB_MONGODB_HOST: mongo:27017
|
|
|
|
POUSSETACHES_AUTH_KEY: lol
|
2019-04-12 07:31:39 +00:00
|
|
|
commands:
|
2019-04-12 18:21:11 +00:00
|
|
|
- sleep 5
|
|
|
|
- 'docker run -p 5006:5005 --net fede -v "`pwd`/tests/fixtures/instance1/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_HOSTNAME -e MICROBLOGPUB_MONGODB_HOST -e POUSSETACHES_AUTH_KEY --name instance1_web microblogpub'
|
2019-04-11 20:07:44 +00:00
|
|
|
|
2019-04-12 18:21:11 +00:00
|
|
|
- name: microblogpub_instance2
|
|
|
|
image: docker:dind
|
|
|
|
detach: true
|
|
|
|
environment:
|
|
|
|
DOCKER_HOST: tcp://docker:2375
|
|
|
|
MICROBLOGPUB_DEBUG: 1
|
|
|
|
MICROBLOGPUB_HOSTNAME: instance2_web
|
|
|
|
MICROBLOGPUB_MONGODB_HOST: mongo:27017
|
|
|
|
POUSSETACHES_AUTH_KEY: lol
|
2019-04-12 07:31:39 +00:00
|
|
|
commands:
|
2019-04-12 18:21:11 +00:00
|
|
|
- 'docker run -p 5007:5005 --net fede -v "`pwd`/tests/fixtures/instance2/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_HOSTNAME -e MICROBLOGPUB_MONGODB_HOST -e POUSSETACHES_AUTH_KEY --name instance2_web microblogpub'
|
|
|
|
|
|
|
|
|
|
|
|
- name: integration_test
|
|
|
|
image: python:3
|
|
|
|
commands:
|
|
|
|
- pip install -U pip
|
|
|
|
- pip install -r dev-requirements.txt
|
|
|
|
# Federation tests (with two local instances)
|
|
|
|
- python -m pytest -v -s --ignore data -k federatio
|
2019-04-12 07:31:39 +00:00
|
|
|
|
|
|
|
services:
|
2019-04-12 07:35:56 +00:00
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
2019-04-12 18:21:11 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
|
|
|
hmac: 0e02bf6fbcb514be8d3ee0f4a315c3f560f762ee474d27a009281b20cc8123ab
|
|
|
|
|
|
|
|
...
|