Re: Blue ocean Pipeline chaining

39 views
Skip to first unread message

Slide

unread,
Jun 1, 2017, 3:12:54 AM6/1/17
to Jenkins Users
Please don't double post.

On Wed, May 31, 2017 at 11:25 PM viral chande <viral.h...@gmail.com> wrote:
Hi,
    Is there any why i can trigger one pipeline at the end of another in blue ocean?
Thanks,
Regards,
Viral Chande

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a87d10b4-fd80-4155-904b-66a9bd5e1152%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

viral chande

unread,
Jun 1, 2017, 8:17:15 AM6/1/17
to Jenkins Users
I deleted the duplicate post.

viral chande

unread,
Jun 2, 2017, 2:01:39 AM6/2/17
to Jenkins Users
Any response on this will be really helpfull.


On Thursday, June 1, 2017 at 12:42:54 PM UTC+5:30, slide wrote:

Bill Dennis

unread,
Jun 2, 2017, 10:18:52 AM6/2/17
to Jenkins Users



There is no chaining mechanism I am aware of built in.  

If you want to chain 2 pipeline jobs 'P1' and 'P2' you can just build P2 from a 'post' section of the last stage on P1.

Your pipeline code would need to look something like this:

pipeline {
   
    agent any
   
    stages
{
       
        stage
('First') {
            steps
{
                echo
'Pipeline P1 first stage'
           
}
       
}
       
        stage
('Last') {
            steps
{
                echo
'Pipeline P1 last stage'
           
}
           
            post
{
                always
{
                    build
'P2'
               
}
           
}                  
       
}
   
}
   
    post
{
        failure
{
            echo
"Pipeline chain failed"
       
}
   
}
}


You can probably build it in the BlueOcean pipeline editor somehow.

--Bill

viral chande

unread,
Jun 5, 2017, 3:28:31 AM6/5/17
to Jenkins Users
Thanks Bill will try it. But I am looking for someting like triggering another Jenkinsfile(new pipeline) from the current one. I am currently trying things in this directions will keep updating here if I find a way to do it.
Reply all
Reply to author
Forward
0 new messages