Here’s my pipeline.yml file. The rest is straight from this tutorial https://buildkite.com/docs/tutorials/docker-containerized-builds.
steps:
- command: sh scripts/test.sh
plugins:
- docker-compose#v3.3.0:
run: test
config:
- docker-compose.yml
- docker-compose.test.yml
- label: ":docker: Build"
branches: master
plugins:
- docker-compose#v3.3.0:
build:
- web
- worker
- sync
- wait
- label: "setup flyctl"
branches: master
commands:
- curl -L https://fly.io/install.sh | FLYCTL_INSTALL=/usr/local sh
- flyctl auth docker
- wait
- label: ":docker: Push"
branches: master
plugins:
- docker-compose#v3.2.0:
push:
- worker:registry.fly.io/FLY-APP:commit-$BUILDKITE_COMMIT
- wait
- label: "Release fly"
branches: master
commands:
- flyctl deploy -i "registry.fly.io/FLY-APP:commit-$BUILDKITE_COMMIT" -c fly.toml --detach