There is also: https://jenkins.io/doc/pipeline/
but generally for the steps - if you open a job to edit, you should see either near the pipeline text area or on the left a "Pipeline Syntax" link you can open in a new tab. It gives you a choice of steps that will build the syntax out for you as things you can copy and paste. On Wednesday, September 21, 2016 at 1:42:40 PM UTC+10, Cuong Tran wrote: > > The reference link is right on any pipeline job. You should see a > "Pipeline Syntax" link, click on that will give a list of known steps, the > click on the question icon will give you an example. > > > On Tuesday, September 20, 2016 at 1:57:43 PM UTC-7, asmundo wrote: >> >> Thank you Baptiste! >> >> Tested and it worked. You owe you a beer! >> >> I am new to pipeline programming. I worked several hours today on this >> and other pipeline related work. Could you please point me to the >> documentation of this syntax? I must have been looking in the wrong >> location. >> >> Cheers >> >> >> >> On Tue, Sep 20, 2016 at 10:47 PM, Baptiste Mathus <[email protected]> >> wrote: >> >>> Hi, >>> >>> stage('tests') { >>> parallel 'longTests': { >>> build job: 'testjob1', quietPeriod: 0 >>> }, 'shortTests':{ >>> // this will fail 1 sec >>> build job: 'testjob2', quietPeriod: 0 >>> }, failFast: true >>> >>> } >>> >>> Cheers >>> >>> 2016-09-20 22:43 GMT+02:00 Åsmund Østvold <[email protected]>: >>> >>>> hi All, >>>> >>>> Do anybody have an example or a pointer to how one could terminate a >>>> parallel pipeline section on first failure? >>>> >>>> The use case is that I have 14 tests in a checkin regression pipeline. >>>> Some tests take 2 min some take 40 min. To speed up feedback to the users >>>> we want to give feed back ASAP if a test did fail. >>>> >>>> My test pipeline is: >>>> >>>> stage('tests') { >>>> parallel 'longTests': { >>>> build job: 'testjob1', quietPeriod: 0 >>>> }, 'shortTests':{ >>>> // this will fail 1 sec >>>> build job: 'testjob2', quietPeriod: 0 >>>> } >>>> } >>>> >>>> My current "pipeline" (Build-flow) is able to do this with a ugly hack: >>>> >>>> import static hudson.model.Result.FAILURE >>>> import groovy.time.* >>>> >>>> parallel ( >>>> { b = build("testjob1") >>>> if (b.getResult().toString() != "SUCCESS") { >>>> upstream.getExecutor().interrupt(FAILURE) >>>> } >>>> }, >>>> { b = build("testjob2"]) >>>> if (b.getResult().toString() != "SUCCESS") { >>>> upstream.getExecutor().interrupt(FAILURE) >>>> } >>>> } >>>> ) >>>> >>>> Regard, >>>> Asmund >>>> >>>> -- >>>> 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/CA%2BzfM3Bq0x7djYpWaXfvSbHrFf2DuGJeZ8fEsVskT%3DDfTeKq2w%40mail.gmail.com >>>> >>>> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BzfM3Bq0x7djYpWaXfvSbHrFf2DuGJeZ8fEsVskT%3DDfTeKq2w%40mail.gmail.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/CANWgJS76kD0W0dTTPeF3P0xXtC1UomAHJ6Swtbog68%3DPDSWyPQ%40mail.gmail.com >>> >>> <https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS76kD0W0dTTPeF3P0xXtC1UomAHJ6Swtbog68%3DPDSWyPQ%40mail.gmail.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/56293faf-3380-4601-ab74-ccf8710f4c56%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
