No such DSL method 'post' found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

No such DSL method 'post' found

Indra Gunawan
Hi,

I would like to archive build images files produced after a successful build step/stage in Jenkins pipeline.
Is "post", the declarative pipeline syntax, the only way to have post-build defined in Jenkins pipeline.

Somehow it is not available on the Jenkins environment I have:

java.lang.NoSuchMethodError: No such DSL method 'post' found among steps ...

May I know the plug-in and version of the plug-in that needs to be installed and running?
Can declarative style and old style coexist in the same pipeline script?


The Jenkins I am running is :  CloudBees Jenkins Enterprise 2.46.3.2-rolling

Thank you
-Indra

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ddab8d54-1613-4842-9885-30914eefb558%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: No such DSL method 'post' found

Robert Hales
Sounds like you are trying to use Post in the wrong place - most likely in a scripted pipeline. If you were using it correctly, but it wasn't available, the error message would say something about an "Undefined Section". You can't use "post" in a scripted pipeline. Instead, you have to use a try/catch/finally. 



On Wednesday, October 4, 2017 at 11:23:31 AM UTC-6, Indra Gunawan wrote:
Hi,

I would like to archive build images files produced after a successful build step/stage in Jenkins pipeline.
Is "post", the declarative pipeline syntax, the only way to have post-build defined in Jenkins pipeline.

Somehow it is not available on the Jenkins environment I have:

java.lang.NoSuchMethodError: No such DSL method 'post' found among steps ...

May I know the plug-in and version of the plug-in that needs to be installed and running?
Can declarative style and old style coexist in the same pipeline script?


The Jenkins I am running is :  <a href="https://release-notes.cloudbees.com/product/CloudBees+Jenkins+Enterprise" style="color:rgb(92,53,102);font-family:Helvetica,Arial,sans-serif;font-size:12px;text-align:right;white-space:nowrap;background-color:rgb(246,250,242)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frelease-notes.cloudbees.com%2Fproduct%2FCloudBees%2BJenkins%2BEnterprise\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEqzBfDLnDTd3m6sHcaNdKVHftSBw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frelease-notes.cloudbees.com%2Fproduct%2FCloudBees%2BJenkins%2BEnterprise\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEqzBfDLnDTd3m6sHcaNdKVHftSBw&#39;;return true;">CloudBees Jenkins Enterprise 2.46.3.2-rolling

Thank you
-Indra

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b70a6fe-ef30-4857-aa03-18fc493eddff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.