microblog.pub/.drone.yml

88 lines
2.7 KiB
YAML
Raw Normal View History

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
2019-04-12 19:10:10 +00:00
MICROBLOGPUB_POUSSETACHES_HOST: http://poussetaches:7991
MICROBLOGPUB_INTERNAL_HOST: http://instance1_web:5005
2019-04-12 18:21:11 +00:00
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
2019-04-12 19:10:10 +00:00
- 'docker run -p 5006:5005 --net fede -v "`pwd`/tests/fixtures/instance1/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_INTERNAL_HOST -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
2019-04-12 19:10:10 +00:00
MICROBLOGPUB_POUSSETACHES_HOST: http://poussetaches:7991
MICROBLOGPUB_INTERNAL_HOST: http://instance2_web:5005
2019-04-12 18:21:11 +00:00
MICROBLOGPUB_MONGODB_HOST: mongo:27017
POUSSETACHES_AUTH_KEY: lol
2019-04-12 07:31:39 +00:00
commands:
2019-04-12 19:10:10 +00:00
- 'docker run -p 5007:5005 --net fede -v "`pwd`/tests/fixtures/instance2/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_INTERNAL_HOST -e MICROBLOGPUB_MONGODB_HOST -e POUSSETACHES_AUTH_KEY --name instance2_web microblogpub'
2019-04-12 18:21:11 +00:00
- 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
2019-04-12 19:10:10 +00:00
hmac: e9e0af1e17c84ff087d83fbdd00ba132327cca9365b9805486d5a295443a5bd3
2019-04-12 18:21:11 +00:00
...