Drone plugin to deploy stacks in Docker Swarm
pipeline:
deploy:
image: codestation/drone-stack
host: tcp://example.com:2376
stack_name: mystack
tlsverify: true
secrets: [ docker_cert, docker_key, docker_cacert ]
pipeline:
deploy:
image: codestation/drone-stack
host: tcp://example.com:2376
stack_name: mystack
tlsverify: true
+ registry: registry.example.com
- secrets: [ docker_cert, docker_key, docker_cacert ]
+ secrets: [ docker_username, docker_password, docker_cert, docker_key, docker_cacert ]
The tls, tlsverify, docker_cert, docker_key and docker_cacert combinations are the same of the client modes supported on the docker binary. Check here for more details.
Execute from the working directory:
docker run --rm \
-e PLUGIN_HOST=tcp://example.com:2376 \
-e PLUGIN_TLSVERIFY=true \
-v $(pwd):$(pwd) \
-w $(pwd) \
codestation/drone-stack
Using the drone cli, go to the directory where your docker certificates are located then run the following commands:
drone secret create myuser/myapp --name docker_cert --value @cert.pem
drone secret create myuser/myapp --name docker_key --value @key.pem
drone secret create myuser/myapp --name docker_cacert --value @ca.pem
docker_username - authenticates with this usernamedocker_password - authenticates with this passworddocker_cert - client certificatedocker_key - client keydocker_cacert - CA certificatecompose - compose file to be used, defaults to docker-compose.ymlhost - remote docker swarm host:portprune - prune services that are no longer referencedstack_name - name of the stack to deploytls - use TLS. Implied by tlsverifytlsverify - use TLS and verify the remote hostregistry - authenticates to this registryContent type
Image
Digest
Size
45 MB
Last updated
about 8 years ago
docker pull codestation/drone-stack