This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/.build.yml

35 lines
979 B
YAML
Raw Normal View History

2020-08-17 12:32:40 +02:00
image: archlinux
packages:
- docker
2020-08-18 08:08:07 +02:00
- python-pip
- python-virtualenv
2020-08-17 12:32:40 +02:00
sources:
- https://git.sr.ht/~crocmagnon/blog
secrets:
- 2da6ddc6-3d12-4306-a1e4-8268c6194386
- 29bc352f-0807-46e9-a4ef-2f869f94afa3
- 5c948915-48c2-4542-8fc1-a5676f4d7126
2020-08-18 08:08:07 +02:00
environment:
TESTING: true
2020-08-17 12:32:40 +02:00
tasks:
2020-08-18 08:08:07 +02:00
- test: |
python --version
cd blog
virtualenv venv
venv/bin/python -m pip install -r requirements.txt -r requirements-dev.txt --progress-bar off
venv/bin/python -m pytest
2020-08-17 12:32:40 +02:00
- setup_docker: |
./blog/docker/setup-docker
- build: |
docker info
docker login -u crocmagnon --password-stdin < .docker-secret
docker pull crocmagnon/blog || true
2020-08-17 12:34:44 +02:00
docker build --cache-from crocmagnon/blog:latest -t crocmagnon/blog blog/
2020-08-17 12:32:40 +02:00
docker push crocmagnon/blog
- deploy: |
ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
2020-08-18 11:02:54 +02:00
triggers:
- action: email
condition: failure
to: Gabriel Augendre <gabriel@augendre.info>