I have configured Drone + Gogs + minikube. I can successfully execute a build and publish, but fail on deployment to my minikubeK/8s. I see that Drone is creating a new docker network to spin up a container to do the deployment stage and unfortunately, that breaks connectivity/communications. I’ve configured drone to use a DRONE_RUNNER_NETWORKS. I’m not running an agent being that Drone and Gogs are on the same machine, (Should I use an agent?) Is there anyway to configure Drone not to turn up Docker networks or allow me to be selective? my config is below from my docker-compose.yaml . thanks for the help!
Drone creates a new docker network for each pipeline execution. This is required and cannot be disabled. DRONE_RUNNER_NETWORKS is going to be required. Please note that your git clone url hostname must match the network name. The clone url is provided by the gogs webhook, and can be customized via gogs settings (I’m not sure which, I’ve never had to do this).
any suggestions on how I put the the deploy pipeline execution container in the proper network? I already have DRONE_RUNNER_NETWORKS configured and works for the build and publish phases. However when Drone is executing the deploy phase it’s building anther network. I don’t see where I can configure DRONE_RUNNER_NETWORKS for this phase… thanks again.
Been banging at this for a while, trying different configs and code rev,… and reading. Basically it appears DRONE_RUNNER_NETWORKS doesn’t work. the execution pipeline container still gets instantiated in a new network during my Deployment phase of my pipeline. As I mentioned, build and publish phases are working fine. From what I’ve read, I’m not the first to have this issue and use case requirement. Am I missing something? thanks.
Basically it appears DRONE_RUNNER_NETWORKS doesn’t work
I have tested this setting and can confirm it is working as expected. Community members have also recently confirmed it is working.
I don’t see where I can configure DRONE_RUNNER_NETWORKS for this phase
This setting is global and applies to all pipeline containers. You cannot configure an external network for a single step.
the execution pipeline container still gets instantiated in a new network during my Deployment phase of my pipeline
Your pipeline will always get instantiated with a new per-pipeline network. As I mentioned previously this behavior is required and cannot be disabled. If you set DRONE_RUNNER_NETWORKS=my-network the pipeline containers will be attached to two networks. They will be attached to the per-pipeline network and network my-network.
I do not understand the exact problem you are facing, however, if you need to attach your pipelines to multiple external networks you can pass multiple values to DRONE_RUNNER_NETWORKS separated by a comma. For example:
Brad - Finally getting back to this; thanks for the explanation. I looked at the networks and didn’t see the container in both of network. So I reloaded Docker and things are working. thanks for the help!