Wait for newly-created networks before continuing
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
19df46692f
commit
9f9d4bafe9
|
@ -14,8 +14,10 @@ create_networks() {
|
||||||
echo "--- start create_networks ---"
|
echo "--- start create_networks ---"
|
||||||
IFS=',' read -ra NETWORKS <<< "$PLUGIN_NETWORKS"
|
IFS=',' read -ra NETWORKS <<< "$PLUGIN_NETWORKS"
|
||||||
for NETWORK in "${NETWORKS[@]}"; do
|
for NETWORK in "${NETWORKS[@]}"; do
|
||||||
|
echo "$NETWORK"
|
||||||
docker -H "$REMOTE_DOCKER_HOST" \
|
docker -H "$REMOTE_DOCKER_HOST" \
|
||||||
network create --driver=overlay "$NETWORK" --scope swarm || true
|
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
|
done
|
||||||
echo "--- end create_networks ---"
|
echo "--- end create_networks ---"
|
||||||
}
|
}
|
||||||
|
@ -88,7 +90,6 @@ run_plugin() {
|
||||||
load_deploy_key
|
load_deploy_key
|
||||||
output_versions
|
output_versions
|
||||||
|
|
||||||
echo "$PLUGIN_NETWORKS"
|
|
||||||
if [ -n "$PLUGIN_NETWORKS" ]; then
|
if [ -n "$PLUGIN_NETWORKS" ]; then
|
||||||
create_networks
|
create_networks
|
||||||
fi
|
fi
|
||||||
|
|
Reference in New Issue