added image argument for private images
This commit is contained in:
parent
a8e77f1aee
commit
0ffe15d0e3
|
@ -13,6 +13,10 @@ This is meant to be used as a [Drone plugin](http://plugins.drone.io/).
|
|||
- **deploy_key**: SSH private key part for ssh public key authentication
|
||||
- **stack**: Name of the stack to be deployed
|
||||
|
||||
### Required (If Private Repo)
|
||||
|
||||
- **image**: Name and Tag of image since private image's are not pulled automatically by docker stack deploy
|
||||
|
||||
### Optional (with defaults)
|
||||
|
||||
- **compose** (default: `compose.yml`): compose file to use for deploying
|
||||
|
|
|
@ -67,6 +67,7 @@ run_stack_deploy() {
|
|||
if [[ ! -z "${PLUGIN_REG_USER}" ]] && [[ ! -z "${PLUGIN_REG_PASS}" ]]; then
|
||||
echo "--- discovered secrets, assuming private registry, logging in ---"
|
||||
docker login -u "${PLUGIN_REG_USER}" -p "${PLUGIN_REG_PASS}"
|
||||
docker image pull "${PLUGIN_IMAGE}"
|
||||
docker -H "$REMOTE_DOCKER_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
||||
else
|
||||
docker -H "$REMOTE_DOCKER_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
|
||||
|
|
Loading…
Reference in New Issue