Rollback to only docker without compose in build

This commit is contained in:
Gabriel Augendre 2020-08-21 15:25:13 +02:00
parent 2dbe8bf16e
commit c49c11a23c

View file

@ -1,7 +1,6 @@
image: archlinux image: archlinux
packages: packages:
- docker - docker
- docker-compose
sources: sources:
- https://git.sr.ht/~crocmagnon/blog - https://git.sr.ht/~crocmagnon/blog
secrets: secrets:
@ -16,11 +15,13 @@ tasks:
- build_and_test: | - build_and_test: |
docker login -u crocmagnon --password-stdin < .docker-secret docker login -u crocmagnon --password-stdin < .docker-secret
cd blog cd blog
docker-compose pull django tests || true docker pull crocmagnon/blog:latest || true
docker-compose build --pull django docker pull crocmagnon/blog:tests || true
docker-compose build tests docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile .
docker-compose run tests docker build --cache-from crocmagnon/blog:tests -t crocmagnon/blog:tests -f tests.Dockerfile .
docker-compose push django tests docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh
docker push crocmagnon/blog:latest
docker push crocmagnon/blog:tests
- deploy: | - deploy: |
ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy" ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
triggers: triggers: