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/.builds/freebsd.yml

37 lines
1,000 B
YAML
Raw Normal View History

2020-11-12 11:47:29 +01:00
image: freebsd/12.x
packages:
2020-12-26 14:36:46 +01:00
- python39
- py39-sqlite3
2020-11-12 11:47:29 +01:00
- jpeg-turbo
2020-11-12 15:06:59 +01:00
- py37-ansible
2020-11-12 11:47:29 +01:00
sources:
- https://git.sr.ht/~crocmagnon/blog
secrets:
2020-11-12 14:46:22 +01:00
- ea931da1-9acd-47b0-b6c9-52b8b61c4647 # Ansible hosts file
2020-11-12 11:47:29 +01:00
- 5c948915-48c2-4542-8fc1-a5676f4d7126 # Deploy SSH key
environment:
POETRY_VERSION: 1.1.4
tasks:
- install_poetry: |
mkdir $HOME/bin
2020-12-26 14:36:46 +01:00
ln -s $(which python3.9) $HOME/bin/python
2020-12-26 15:20:40 +01:00
python -m ensurepip
python -m pip install poetry==$POETRY_VERSION
2020-11-12 11:47:29 +01:00
- install_deps: |
cd blog
2020-12-26 15:20:40 +01:00
python -m poetry install -n
2020-11-12 11:47:29 +01:00
- test: |
cd blog
2020-12-26 15:20:40 +01:00
python -m poetry run ./docker/runtests.sh
2020-11-24 21:59:07 +01:00
- check-branch: |
cd blog
if [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]; then \
complete-build; \
fi
2020-11-12 14:46:22 +01:00
- deploy: |
2020-11-12 15:06:59 +01:00
ansible-playbook -i ~/ansiblehosts --ssh-common-args "-o StrictHostKeyChecking=no" blog/ansible/playbook.yml
2020-11-12 11:47:29 +01:00
triggers:
- action: email
condition: failure
to: Gabriel Augendre <gabriel@augendre.info>