0

I am running :

  • drone-server on top of kubernetes
  • and drone-kubernetes-runner to dynamically provisioning runner as pods.

After investigation, i found the Pod YAML of each runner defines the 1st step "git clone" using the image drone/git.

I am running the pipeline in offline environment. I have to specify nexus.company.local/drone/git instead of drone/git to avoid fetching from the public registry.

I search everywhere, but no way. Even image_pull_secrets is valuable for explicit steps that i can define. It's NOT valuable for implicit steps like the "clone" step

enter image description here

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254

2 Answers2

1

You could disable the automatic cloning and add an explicit step, specifying your own image with the nexus mirror origin.

For example:

kind: pipeline

clone:
  disable: true

steps:
  - name: clone
    image: nexus.company.local/drone/git

Thomas
  • 11,272
  • 2
  • 24
  • 40
  • that's really cool! thanks! .. but what about leveraging the default clone command and args which depends from event to another ? – Abdennour TOUMI Jul 18 '21 at 21:29
  • You can use the official drone/git image mirrored to your repo. Make sure to provide all environment variables that are required and you should be good to go. – Thomas Jul 19 '21 at 08:54
0
DRONE_RUNNER_CLONE_IMAGE=nexus.company.local/drone/git

REF: https://docs.drone.io/runner/docker/configuration/reference/drone-runner-clone-image/

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254