This is the deployment runner script we use in our BitBucket pipelines. It does the following things, in this order:
- Sign in to Docker Hub
So we can download images and propagate authentication to Swarm nodes. This connects to the connection in
DOCKER_HOST(defaulting to the Docker socket), so you can also run this within a deployment container - see below for more.
- Expand secrets and configs
To configure services, we can use configs and secrets to let the swarm engine mount those values securely