diff --git a/plugin.sh b/plugin.sh index 1b5799b..6c39f32 100755 --- a/plugin.sh +++ b/plugin.sh @@ -14,8 +14,10 @@ create_networks() { echo "--- start create_networks ---" IFS=',' read -ra NETWORKS <<< "$PLUGIN_NETWORKS" for NETWORK in "${NETWORKS[@]}"; do + echo "$NETWORK" docker -H "$REMOTE_DOCKER_HOST" \ network create --driver=overlay "$NETWORK" --scope swarm || true + until [ -n "$(docker -H "$REMOTE_DOCKER_HOST" network ls -f "name=$NETWORK" -q)" ]; do sleep 1; done done echo "--- end create_networks ---" } @@ -88,7 +90,6 @@ run_plugin() { load_deploy_key output_versions - echo "$PLUGIN_NETWORKS" if [ -n "$PLUGIN_NETWORKS" ]; then create_networks fi