![](/img/trans.png)
[英]Jenkins Multibranch Pipeline with Jenkinsfile not in repository
[英]Multibranch jenkins - jenkinsfile is on submodule
我有同樣的問題: Jenkins multibranch - 如何掃描 jenkinsfile 放置在子模塊上的分支?
請注意,這兩個存儲庫都放置在私有 gitlab 服務器上,並且它們被設置為私有。 但是,我在 Jenkins 上相互依賴地結帳時沒有問題。
我將 jenkinsfile 用於放置在子模塊上的分支,如下所示:
main/
...
submodule/ -> submodule
jenkinsfile
但我無法運行多分支管道。 掃描無法檢測到 jenkinfile:
Checking branches...
Checking branch main
‘submodule/jenkinsfile’ not found
Does not meet criteria
Processed 1 branches
我已經嘗試了以下線程上的所有選項: Git submodules not updated in Jenkins build
但沒有一個工作。
版本:
有人想出解決方案嗎? 謝謝
我已經設法根據這個線程解決了我的問題: https://devops.stackexchange.com/questions/9243/is-there-a-way-to-use-a-jenkinsfile-from-a-git-submodule -in-a-multibranch-pipeli
我已經安裝了這個插件: https://plugins.jenkins.io/remote-file/它解決了我的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.