簡體   English   中英

詹金斯錯誤與插件bitbucket分支源插件

[英]Jenkins error with plugin bitbucket branch source plugin

自上次插件更新以來,我所有的構建都失敗了,但是我沒有更改任何配置。 我試圖回滾到插件的最新版本,但問題仍然存在。

似乎BitbucketStatusNotificationPlugin試圖訪問一些Mercurial類...

該項目是多分支管道。 詹金斯(Jenkins)項目JENKINS-46296的官方JIRA也提到了此問題

任何幫助將非常感激。

謝謝!

這是輸出:

 Started by user Olivier
 Checking out git REPO_URL
 into /var/jenkins_home/workspace/TaaS_API_TaaS_develop-HDR4FYYRLEPSYBGEYT6L5UEWPW5HVQDT5PW7ZBCJ6VTGPTYLU6OQ@script to read Jenkinsfile
 > git rev-parse --is-inside-work-tree # timeout=10
 Fetching changes from the remote Git repository
 > git config remote.origin.url 
timeout=10
 Fetching without tags
 Fetching upstream changes from REPO_URL
 > git --version # timeout=10
 using GIT_ASKPASS to set credentials Bitbucket pass
 > git fetch --no-tags --progress 
 +refs/heads/develop:refs/remotes/origin/develop
 Checking out Revision 5fa34124eb6be5ab7242633a97cced7de4e7af5e (develop)
 Commit message: "Finish team"
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 5fa34124eb6be5ab7242633a97cced7de4e7af5e
 > git rev-list 5fa34124eb6be5ab7242633a97cced7de4e7af5e # timeout=10
 java.lang.IllegalAccessError: tried to access class hudson.plugins.mercurial.MercurialSCMSource$MercurialRevision from class com.cloudbees.jenkins.plugins.bitbucket.BitbucketBuildStatusNotifications
 at com.cloudbees.jenkins.plugins.bitbucket.BitbucketBuildStatusNotifications.getHash(BitbucketBuildStatusNotifications.java:124)
 at com.cloudbees.jenkins.plugins.bitbucket.BitbucketBuildStatusNotifications.sendNotifications(BitbucketBuildStatusNotifications.java:104)
 at com.cloudbees.jenkins.plugins.bitbucket.BitbucketBuildStatusNotifications.access$000(BitbucketBuildStatusNotifications.java:54)
 at com.cloudbees.jenkins.plugins.bitbucket.BitbucketBuildStatusNotifications$JobCheckOutListener.onCheckout(BitbucketBuildStatusNotifications.java:14
 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)
 at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
 at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
 at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
 at hudson.model.ResourceController.execute(ResourceController.java:97)
 at hudson.model.Executor.run(Executor.java:405)
 Finished: FAILURE

這很可能是由於插件之間的版本不兼容引起的。

確保將所有必需的依賴項至少更新為必需的版本。 可以在插件頁面上找到最新版本的插件所需的最低依賴版本。

對於較舊的版本,到目前為止我發現的最容易獲得此信息的地方可能是pom文件, 例如版本2.2.4

在版本2.0的MercurialSCMSource.MercurialRevision插件之前, MercurialSCMSource.MercurialRevision類型是程序包私有的 (其他程序包/插件不可見)。

Bitbucket分支源插件的最新版本(2.2.6)聲明至少依賴於mercurial插件的2.0版。 我不確定所使用的版本聲明了哪個版本,但是自從至少版本2.2.0的Bitbucket Branch Source插件以來,似乎已經要求使用mercurial 2.0。

即使您不使用Mercurial,仍然需要代碼/類。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM