简体   繁体   中英

Multibranch jenkins - jenkinsfile is on submodule

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

I've managed to resolve my issues based on this thread: https://devops.stackexchange.com/questions/9243/is-there-a-way-to-use-a-jenkinsfile-from-a-git-submodule-in-a-multibranch-pipeli

i've installed this plugin: https://plugins.jenkins.io/remote-file/ and it solved my issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM