Re: How can I distinguish between two custom steps of the same class?

2017-01-27 Thread Jesse Glick
On Thu, Jan 26, 2017 at 3:54 PM, Daniel Beck wrote: > A single action is used to record copied files, and amended as needed. BTW in this example no backreference to the `Run` was needed. If the action does need to refer to the `Run` for any reason, typically so it can

Re: How can I distinguish between two custom steps of the same class?

2017-01-26 Thread Daniel Beck
> On 26.01.2017, at 19:52, Moshe Cohen wrote: > > Can you point me to an example that does what you just mentioned? > This PR (that I really need to finish some timeā€¦) does something similar in Copy Artifact: https://github.com/jenkinsci/copyartifact-plugin/pull/32 A

Re: How can I distinguish between two custom steps of the same class?

2017-01-26 Thread Moshe Cohen
Thank you. Can you point me to an example that does what you just mentioned? On Thu, Jan 26, 2017 at 8:47 PM, Jesse Glick wrote: > On Thu, Jan 26, 2017 at 12:33 PM, Moshe Cohen wrote: > > When there are more than one such steps in a job, how can I

Re: How can I distinguish between two custom steps of the same class?

2017-01-26 Thread Jesse Glick
On Thu, Jan 26, 2017 at 12:33 PM, Moshe Cohen wrote: > When there are more than one such steps in a job, how can I distinguish > between them within the 'perform' method? You cannot, as such, but you can attach a custom `Action` to the `Run` which records which artifacts have

How can I distinguish between two custom steps of the same class?

2017-01-26 Thread Moshe Cohen
Hi, I have a custom build step (extends Builder). Its 'perform' method gets a build object as an argument. When there are more than one such steps in a job, how can I distinguish between them within the 'perform' method? The need to do this is because an artifact is published for each such