These are some really good hints, they should be added to the workflow documentation Domi
> On 15.09.2015, at 20:28, Jesse Glick <[email protected]> wrote: > >> On Tue, Sep 15, 2015 at 9:24 AM, jcsirot <[email protected]> wrote: >> I am currently working on the support of the workflow plugin for the ansible >> plugin and I'm facing some questions. > > Happy to help! BTW if you have a PR in progress, feel free to CC > @jglick on it. Also if there is a JIRA issue open, mark with the > `workflow` label, and make sure > `jenkinsci/workflow-plugin/COMPATIBILITY.md` links to it. > > Did you attend my recent Office Hour on Workflow-related plugin > development, or watch the recorded video? > https://www.youtube.com/watch?v=4zdy7XGx3PA > > Also: > https://github.com/jenkinsci/workflow-plugin/blob/master/COMPATIBILITY.md#plugin-developer-guide > >> 1. I wonder which versions of jenkins and workflow plugin I should use in >> the pom.xml? For the moment I'm using Jenkins 1.580.1 and workflow 1.4.2 but >> the docker workflow plugin is using Jenkins 1.596.1 and workflow >> 1.7-alpha-1. > > Or the latest versions of Workflow (1.8+) requires 1.609.1+. Up to > you; depends on your sensitivity to locking out users of old LTS > lines, vs. being able to use features of, and test against, the latest > upstream software. WF 1.4.2 + Jenkins 1.580.1 is the most conservative > choice. > >> 2. Should I extend AbstractSynchronousNonBlockingStepExecution or >> AbstractStepExecutionImpl? > > If you are indeed using WF 1.10+ with > `AbstractSynchronousNonBlockingStepExecution` available, use it in > preference to `AbstractSynchronousStepExecution` in most cases. > >> I'm not sure the clearly understand the impact of >> synchronous and asynchronous executions on the workflow engine. An example >> of AbstractStepExecutionImpl implementation would be greatly appreciated > > So if you *are* writing a custom step, you would use the more general > `AbstractStepExecutionImpl` if your step needs to initiate some > process, then wait (say, for an external service to call you back), > then do something else later. You would also use it if your step > `takesImplicitBlockArgument` (so invoked with a `{…}` closure). If the > step just does something and exits as soon as it can, it is a > synchronous step. > >> 3. Should I upgrade the Builder subclass to implement the SimpleBuildStep >> interface? > > That is the easiest approach to compatibility. There is no need for > any Workflow APIs at all. Your builder will behave exactly as it does > in a freestyle build. You get less flexibility this way: for example, > you lose the option of running the build step outside of a `node {}` > block, even if it does not actually need a slave/workspace. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3qzE5AbOs-gY%2B9etdPSA%2Bb5GZhf1CyPLiyPu4MCYKqZQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/6730167D-41A0-44A9-BA3C-F1DE741C60BA%40fortysix.ch. For more options, visit https://groups.google.com/d/optout.
