Multibranch jenkins - jenkinsfile is on submodule

Viewed 25

I have the same problem as in: Jenkins multibranch - how to scan branches where jenkinsfile is placed on a submodule?

Note that both repositories are placed on a private gitlab server and they are set as private. However i've no problem in checkout both interdependently on Jenkins.

I have my jenkinsfile for a branch placed on a submodule like so:

main/
   ...
   submodule/ -> submodule
      jenkinsfile

But i'm unable to run a Multibranch pipeline. The scan cannot detect the jenkinfile:

Checking branches...
  Checking branch main
      ‘submodule/jenkinsfile’ not found
    Does not meet criteria
Processed 1 branches

I've tried all the options on the following thread: Git submodules not updating in Jenkins build

But none work.

Versions:

  • jenkins version: Jenkins 2.332.3
  • Git plugin Version 4.11.5 GitHub
  • Branch Source Plugin Version 1677.v731f745ea_0cf

As anyone figure out the solution to this? Thanks

1 Answers
Related