Is there any way a plugin can save some data between builds?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any way a plugin can save some data between builds?

Daniel Anechitoaie
Hi,

I have a plugin that zips some files and uploads them somewhere and I'd like to skip the upload process if the files haven't changed.
So I'm thinking in just making a SHA1 hash of the ZIP file and if it's the same as in previous build then skip the upload part and just finish the build.

Is there any API/or way that a plugin can save same data for each build (in my case the sha1 hash) that can then be retrieved from next build?

Thank you.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/35b09a5e-7e82-4f16-8d87-844ff16644c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way a plugin can save some data between builds?

Jesse Glick-4
On Tue, May 29, 2018 at 5:26 AM, Daniel Anechitoaie
<[hidden email]> wrote:
> Is there any API/or way that a plugin can save same data for each build (in
> my case the sha1 hash) that can then be retrieved from next build?

http://javadoc.jenkins.io/hudson/model/Run.html#addAction-hudson.model.Action-

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/CANfRfr2Duo9ux%3DhJUaSkebEg3sxOsMmz7_FxH7vC9FT_s6oDkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way a plugin can save some data between builds?

Daniel Anechitoaie
Awesome. Seems to be exactly what I need.
Thank you.


On Tuesday, May 29, 2018 at 7:30:11 PM UTC+3, Jesse Glick wrote:
On Tue, May 29, 2018 at 5:26 AM, Daniel Anechitoaie
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Emh_Zn4aAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">danie...@...> wrote:
> Is there any API/or way that a plugin can save same data for each build (in
> my case the sha1 hash) that can then be retrieved from next build?

<a href="http://javadoc.jenkins.io/hudson/model/Run.html#addAction-hudson.model.Action-" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjavadoc.jenkins.io%2Fhudson%2Fmodel%2FRun.html%23addAction-hudson.model.Action-\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEzsRtXYq7PNtO5lpykSLG6ZlRe4g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjavadoc.jenkins.io%2Fhudson%2Fmodel%2FRun.html%23addAction-hudson.model.Action-\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEzsRtXYq7PNtO5lpykSLG6ZlRe4g&#39;;return true;">http://javadoc.jenkins.io/hudson/model/Run.html#addAction-hudson.model.Action-

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/fdefc4af-7de2-4083-ba47-10e8c94e96ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.