Hi Mark I found the git section in the "check out scm", and once I upgraded the pipeline plugins in DEV to match the versions in PRD, the git option disappeared too, therefore matches to PRD. Thanks for your suggestion about git, I will look into that.
Jirong On Monday, 8 August 2016 15:18:48 UTC-4, Mark Waite wrote: > > Does the "git"section appear if you choose "checkout" from the snippet > generator instead of choosing "git"? > > Is there a reason you haven't updated to the most recent version of the > git plugin? Git plugin 2.5.1 added much better support for setting git > options from pipeline jobs. Git plugin 2.5.3 (the most recent release) is > the best git plugin for pipeline use as far as I can tell. > > Also, I've preferred to use the "checkout" snippet generator. It lets me > choose the detailed git options that I want (so long as I use git plugin > 2.5.3). > > Mark Waite > > On Mon, Aug 8, 2016 at 12:56 PM Jirong Hu <[email protected] <javascript:>> > wrote: > >> Hi Daniel >> >> We are also getting this error and a restart doesn't fix it. Please see >> more details in this post: >> http://stackoverflow.com/questions/38831216/jenkins-pipeline-sample-step-missing-git-git >> >> Below are Git related plugin versions on our servers. Any suggestion? >> Thanks. >> >> DEV PRD >> git 2.4.4 2.4.4 git >> git-client 1.19.6 1.19.6 git-client >> git-server 1.6 1.7 git-server >> github 1.14.0 1.14.0 github >> github-api 1.75 1.75 github-api >> github-branch-source 1.7 1.8.1 github-branch-source >> github-organization-folder 1.3 1.4 github-organization-folder >> >> On Thursday, 9 June 2016 05:19:55 UTC-4, Daniel Beck wrote: >> >>> Restart Jenkins. There's a known issue with plugin load order. >>> >>> > On 09.06.2016, at 07:13, John McC <[email protected]> wrote: >>> > >>> > I have: >>> > >>> > Git client plugin 1.19.6 >>> > Git plugin 2.4.4 >>> > Git server plugin 1.6 >>> > Github API plugin 1.75 >>> > [a few other github plugins] >>> > >>> > On Wednesday, June 8, 2016 at 7:19:51 PM UTC-7, Michael Neale wrote: >>> > normally that means that the git plugin is not installed, but I think >>> it is included with the "recommended" - can you double check the installed >>> plugin list? >>> > >>> > On Thursday, June 9, 2016 at 7:52:07 AM UTC+10, John McC wrote: >>> > I just downloaded and installed the Mac OSX package (Jenkins 2.8) and >>> created a test pipeline, using the sample script (shown below). The >>> plugins seem to be in place (I opted to let the install choose the common >>> ones for me). >>> > >>> > node { >>> > // Mark the code checkout 'stage'.... >>> > stage 'Checkout' >>> > >>> > // Get some code from a GitHub repository >>> > git url: ' >>> https://github.com/jglick/simple-maven-project-with-tests.git' >>> > >>> > // Get the maven tool. >>> > // ** NOTE: This 'M3' maven tool must be configured >>> > // ** in the global configuration. >>> > def mvnHome = tool 'M3' >>> > >>> > // Mark the code build 'stage'.... >>> > stage 'Build' >>> > // Run the maven build >>> > sh "${mvnHome}/bin/mvn clean install" >>> > } >>> > >>> > [Pipeline] End of Pipeline >>> > >>> > java.lang.NoSuchMethodError: No such DSL method 'git' found among >>> [archive, bat, build, catchError, checkout, deleteDir, dir, echo, emailext, >>> error, fileExists, input, isUnix, load, mail, node, parallel, properties, >>> pwd, readFile, readTrusted, retry, sh, sleep, stage, stash, step, svn, >>> timeout, timestamps, tool, unarchive, unstash, waitUntil, withCredentials, >>> withEnv, wrap, writeFile, ws] >>> > at org.jenkinsci.plugins. >>> > workflow.cps.DSL.invokeMethod( >>> > DSL.java:108) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsScript.invokeMethod(CpsScript.java: >>> > 113) >>> > at groovy.lang.GroovyObject$ >>> > invokeMethod.call(Unknown Source) >>> > 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:151) >>> > at org.kohsuke.groovy.sandbox. >>> > GroovyInterceptor.onMethodCall( >>> > GroovyInterceptor.java:21) >>> > at org.jenkinsci.plugins. >>> > scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall( >>> > SandboxInterceptor.java:115) >>> > at org.kohsuke.groovy.sandbox. >>> > impl.Checker$1.call(Checker. >>> > java:149) >>> > at org.kohsuke.groovy.sandbox. >>> > impl.Checker.checkedCall( >>> > Checker.java:146) >>> > at org.kohsuke.groovy.sandbox. >>> > impl.Checker.checkedCall( >>> > Checker.java:123) >>> > at com.cloudbees.groovy.cps. >>> > sandbox.SandboxInvoker.methodCall(SandboxInvoker. >>> > java:15) >>> > at WorkflowScript.run( >>> > WorkflowScript:6) >>> > at ___cps.transform___(Native Method) >>> > at com.cloudbees.groovy.cps.impl. >>> > ContinuationGroup.methodCall( >>> > ContinuationGroup.java:55) >>> > at com.cloudbees.groovy.cps.impl. >>> > FunctionCallBlock$ContinuationImpl.dispatchOrArg( >>> > FunctionCallBlock.java:106) >>> > at com.cloudbees.groovy.cps.impl. >>> > FunctionCallBlock$ContinuationImpl.fixArg( >>> > FunctionCallBlock.java:79) >>> > 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:497) >>> > at com.cloudbees.groovy.cps.impl. >>> > ContinuationPtr$ContinuationImpl.receive( >>> > ContinuationPtr.java:72) >>> > at com.cloudbees.groovy.cps.impl. >>> > >>> CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java: >>> >>> >>> > 55) >>> > at com.cloudbees.groovy.cps.impl. >>> > >>> CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java: >>> > 45) >>> > 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:497) >>> > at com.cloudbees.groovy.cps.impl. >>> > ContinuationPtr$ContinuationImpl.receive( >>> > ContinuationPtr.java:72) >>> > at com.cloudbees.groovy.cps.impl. >>> > ConstantBlock.eval( >>> > ConstantBlock.java:21) >>> > at com.cloudbees.groovy.cps.Next. >>> > step(Next.java:58) >>> > at com.cloudbees.groovy.cps. >>> > Continuable.run0(Continuable. >>> > java:154) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.SandboxContinuable.access$001( >>> > SandboxContinuable.java:19) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.SandboxContinuable$1.call( >>> > SandboxContinuable.java:33) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.SandboxContinuable$1.call( >>> > SandboxContinuable.java:30) >>> > at org.jenkinsci.plugins. >>> > scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox( >>> > GroovySandbox.java:108) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.SandboxContinuable.run0( >>> > SandboxContinuable.java:30) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsThread.runNextChunk(CpsThread.java: >>> > 164) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsThreadGroup. >>> > run(CpsThreadGroup.java:276) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup. >>> > java:78) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsThreadGroup$2. >>> > call(CpsThreadGroup.java:185) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsThreadGroup$2. >>> > call(CpsThreadGroup.java:183) >>> > at org.jenkinsci.plugins. >>> > workflow.cps.CpsVmExecutorService$2.call( >>> > CpsVmExecutorService.java:47) >>> > at java.util.concurrent. >>> > FutureTask.run(FutureTask. >>> > java:266) >>> > at hudson.remoting. >>> > SingleLaneExecutorService$1.run(SingleLaneExecutorService. >>> > java:112) >>> > at jenkins.util. >>> > ContextResettingExecutorService$1.run(ContextResettingExecutorServic >>> > e.java:28) >>> > 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) >>> > Finished: FAILURE >>> > >>> > >>> > Any suggestions? >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> >> > To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> > To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/5f05e1e8-a58d-4ec0-b3c3-b7995b550c4e%40googlegroups.com. >>> >>> >>> > For more options, visit https://groups.google.com/d/optout. >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/d2ffa604-82e4-499a-abc7-b80d79970d05%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/d2ffa604-82e4-499a-abc7-b80d79970d05%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/382c4765-a8d3-4eac-8a24-563ae4330b0b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
