This repository has been archived on 2024-07-25. You can view files and clone it, but cannot push or open issues or pull requests.
docker_stack/entrypoint.sh
Dmitriy Pleshevskiy 73a64b6ea1
Some checks failed
continuous-integration/drone/push Build is failing
add org_registry env by default
2022-06-07 14:59:39 +03:00

18 lines
373 B
Bash

#!/bin/sh
set -ex
if [ -n "$PLUGIN_PASSWORD" ]; then
echo -n "$PLUGIN_PASSWORD" | \
docker login \
-u "$PLUGIN_USERNAME" \
--password-stdin \
${PLUGIN_REGISTRY:-$ORG_REGISTRY}
AUTH_FLAGS=--with-registry-auth
fi
docker stack deploy \
$AUTH_FLAGS \
-c "${PLUGIN_COMPOSE_FILE_PATH:-docker-compose.yml}" \
"${PLUGIN_NAME:-$DRONE_REPO_NAME}"