Drone

Pull custom plugin from insecure registry

I wanted to customize the plugin here: https://github.com/komljen/drone-kubectl-helm

So, i forked it to https://github.com/fraternityops/drone-kubectl-helm and added my changes with a .drone.yml to build it and push the image to a local insecure docker-registry. But when i use my custom plugin in another drone.yml, the next stage of GIT clone hangs infinitely and doesn’t show any logs.

I then added a docker hub repo: https://hub.docker.com/r/fraternityops/drone-kubectl-helm and set it auto build on GitHub changes. Now, the plugin works perfectly.

Does drone require additional flags/configuration to run plugins from insecure docker registries?

This is .drone.yml for the plugin:

kind: pipeline
name: default

steps:
- name: drone-kubectl-helm
  image: plugins/docker
  pull: always
  settings:
    registry: localhost:5000
    repo: localhost:5000/drone-kubectl-helm
    insecure: true

This is the .drone.yml where the above plugin was used

global-variables:
  settings:
    - env: &env
        KUBERNETES_TOKEN:
          from_secret: kubernetes_token
        KUBERNETES_CERT:
          from_secret: kubernetes_cert
        KUBERNETES_SERVER:
          from_secret: kubernetes_server

kind: pipeline
name: default

steps:
- name: deploy
  image: localhost:5000/drone-kubectl-helm
  pull: always
  environment:
    <<: *env
  settings:
    kubectl: "get pods"

No configuration changes are required to Drone, however, you do need to provide the host machine docker daemon with addition configuration to pull from an insecure docker registry. See https://docs.docker.com/registry/insecure/

Will do that. Thanks