Jenkins 詹金斯的新人;如果没有这样的DSL方法,简单构建就会失败;管道';在台阶间找到的
我有一个简单的hello world项目,在一个新的Jenkins安装上失败了。我正在按照此URL中的说明进行操作: 为供参考,安装了以下简单构建管道插件: 构建管道插件1.5.8Jenkins 詹金斯的新人;如果没有这样的DSL方法,简单构建就会失败;管道';在台阶间找到的,jenkins,jenkins-pipeline,Jenkins,Jenkins Pipeline,我有一个简单的hello world项目,在一个新的Jenkins安装上失败了。我正在按照此URL中的说明进行操作: 为供参考,安装了以下简单构建管道插件: 构建管道插件1.5.8 管道继续运行步骤1.0 管道实用程序步骤2.6.1 管道:API 2.40 管道:基本步骤2.22 管道:构建步骤2.13 管道:Groovy 2.85 管道:输入步骤2.12 管道:作业2.40 管道:保持环境步骤插件1.0 管道:节点和进程2.36 管道:RESTAPI插件2.18 管道:SCM步骤2.11 管道
管道继续运行步骤1.0
管道实用程序步骤2.6.1
管道:API 2.40
管道:基本步骤2.22
管道:构建步骤2.13
管道:Groovy 2.85
管道:输入步骤2.12
管道:作业2.40
管道:保持环境步骤插件1.0
管道:节点和进程2.36
管道:RESTAPI插件2.18
管道:SCM步骤2.11
管道:阶段步骤2.5
管道:舞台视图插件2.18
管道:步骤API 2.23
管道:支持API 3.6
可锁定资源 (这也使得我在发布前阅读的以下链接不适用:,) 因此,根据下面的教程,我创建了一个管道,并在配置中将以下代码放在“管道”部分: 当我单击“立即构建”按钮时,我从控制台输出中获得以下内容:
Started by user dogzilla
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] End of Pipeline
java.lang.NoSuchMethodError: No such DSL method 'pipeline' found among steps [archive, bat, build, catchError, checkout, compareVersions, deleteDir, dir, echo, error, fileExists, findFiles, getContext, input, isUnix, junit, keepEnv, keepRunning, load, lock, mail, node, nodesByLabel, parallel, powershell, publishChecks, pwd, pwsh, readCSV, readFile, readJSON, readManifest, readMavenPom, readProperties, readYaml, retry, sh, sha1, sleep, stage, stash, step, tee, timeout, tm, tool, touch, unarchive, unstable, unstash, unzip, waitUntil, warnError, withContext, withEnv, wrap, writeCSV, writeFile, writeJSON, writeMavenPom, writeYaml, ws, zip] or symbols [all, always, apiToken, architecture, archiveArtifacts, artifactManager, batchFile, booleanParam, buildButton, buildDiscarder, buildDiscarders, caseInsensitive, caseSensitive, choice, choiceParam, clock, command, credentials, cron, crumb, defaultView, demand, disableConcurrentBuilds, disableResume, downstream, dumb, durabilityHint, envVars, envVarsFilter, file, fileParam, filePath, fingerprint, fingerprints, frameOptions, freeStyle, freeStyleJob, fromScm, fromSource, headRegexFilter, headWildcardFilter, hyperlink, hyperlinkToModels, installSource, javadoc, jdk, jdkInstaller, jnlp, jobBuildDiscarder, jobName, junitTestResultStorage, lastDuration, lastFailure, lastGrantedAuthorities, lastStable, lastSuccess, legacy, list, local, location, logRotator, loggedInUsersCanDoAnything, mailer, masterBuild, maven, maven3Mojos, mavenErrors, mavenMojos, mavenWarnings, myView, nodeProperties, none, paneStatus, parameters, password, pattern, permanent, pipelineTriggers, plainText, plugin, pollSCM, projectNamingStrategy, proxy, queueItemAuthenticator, quietPeriod, resourceRoot, retainOnlyVariables, run, runParam, schedule, scmRetryCount, scriptApproval, scriptApprovalLink, search, security, shell, simpleBuildDiscarder, slave, sourceRegexFilter, sourceWildcardFilter, sshPublicKey, standard, status, string, stringParam, swapSpace, text, textParam, timezone, tmpSpace, toolLocation, unsecured, upstream, userSeed, viewsTabBar, weather, zfs, zip] or globals [currentBuild, env, params]
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:216)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:142)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
at WorkflowScript.run(WorkflowScript:1)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
at com.cloudbees.groovy.cps.Next.step(Next.java:83)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE
我很好奇为什么这会失败。如果有java问题,Jenkins甚至不会启动。我已经安装了说明书中的所有插件和我读过的一些疑难解答链接
我怎样才能让它工作呢?看起来你缺少了很多管道插件。确保安装“管道”(ID:workflow aggregator),它将安装其他缺少管道的插件
看起来您缺少了一堆管道插件。确保安装“管道”(ID:workflow aggregator),它将安装其他缺少管道的插件
当有人在另一个论坛上帮助我时,我偶然发现了答案。在这里发布,以防对其他人有用 在这方面,它说: 所有有效的声明性管道必须包含在管道块中,例如:
pipeline {
/* insert Declarative Pipeline here */
}
因此,当我将示例脚本包装到管道{}中时,它就起作用了。当有人在另一个论坛上帮助我时,我发现了答案。在这里发布,以防对其他人有用 在这方面,它说: 所有有效的声明性管道必须包含在管道块中,例如:
pipeline {
/* insert Declarative Pipeline here */
}
因此,当我将示例脚本包装到管道{}中时,它可以工作。谢谢。我去了管道管理器,安装了所有带有“管道”一词的东西。另外,在您发送的链接中,大多数插件不再可用或已弃用。谢谢。我去了管道管理器,安装了所有带有“管道”一词的东西。此外,在您发送的链接中,大多数单独的插件不再可用或已弃用。