我们是 jenkins 2.0 的新手。我们要做的是定义一个 Jenkinsfile 并在第一阶段进行检查。我们尝试了很多从我们的 mercurial 存储库中签出我们的项目,但每次尝试我们都会遇到其他问题。问题:是否可以使用 mercurial 插件?
我们尝试的是:
checkout([$class: 'MercurialSCM', branches: [[name: '*/default']], userRemoteConfigs: [[url: 'https://pathToOurRepo.com']]])
但得到了这个例外:
java.lang.NullPointerException
at hudson.plugins.mercurial.MercurialSCM.cachedSource(MercurialSCM.java:915)
at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:766)
at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:556)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:213)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
有没有人可以帮助我们解决这个问题?