one downstream with multiple upstreams(all upstreams should be success)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

one downstream with multiple upstreams(all upstreams should be success)

chenna keshav
Hi,

i have stuck with a small issue... i have a job A which triggers job B and job C. for job B and job C downstream job is job D.... i need this job D is to be triggered when job B and job C both are success. i have tried with "Build after other projects are build" with "trigger only if build is stable" option. its not working for me... the job is getting triggered even one of jobs is success. can some one please help me on this..........

Thanks,
Keshav.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d9d0f7f6-240e-4559-8e4e-8895e00d0ef2n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: one downstream with multiple upstreams(all upstreams should be success)

Gianluca
Hi,
why not triggering Job D directly from job A ? In this way, if you put that in a stage after job B and job C is triggered ... it will only be triggered if both succedded:

stage("Run B and C") {
  steps {
    parallel(
      "job B": { buildJob ... },
      "job C:" { build Job ... },
}

stage("Run D") {
  steps {
   // this will run only if both Job B and C succeed
    buildJob
  }
}

Cheers,
Gianluca.

Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto:
Hi,

i have stuck with a small issue... i have a job A which triggers job B and job C. for job B and job C downstream job is job D.... i need this job D is to be triggered when job B and job C both are success. i have tried with "Build after other projects are build" with "trigger only if build is stable" option. its not working for me... the job is getting triggered even one of jobs is success. can some one please help me on this..........

Thanks,
Keshav.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4839902-97c8-4eb5-baa2-a080a400cfdbn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: one downstream with multiple upstreams(all upstreams should be success)

chenna keshav
Hi Gianluca,

I can't trigger Job D directly from Job A. Actually in my project we are running integration tests in Job B and UI tests in Job C. So if both the builds are green then only  i can merge the code to master in Job D. But thanks for your answer I will try it.

Thanks,
Keshav.
  

On Wed, Sep 2, 2020 at 1:26 AM Gianluca <[hidden email]> wrote:
Hi,
why not triggering Job D directly from job A ? In this way, if you put that in a stage after job B and job C is triggered ... it will only be triggered if both succedded:

stage("Run B and C") {
  steps {
    parallel(
      "job B": { buildJob ... },
      "job C:" { build Job ... },
}

stage("Run D") {
  steps {
   // this will run only if both Job B and C succeed
    buildJob
  }
}

Cheers,
Gianluca.

Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto:
Hi,

i have stuck with a small issue... i have a job A which triggers job B and job C. for job B and job C downstream job is job D.... i need this job D is to be triggered when job B and job C both are success. i have tried with "Build after other projects are build" with "trigger only if build is stable" option. its not working for me... the job is getting triggered even one of jobs is success. can some one please help me on this..........

Thanks,
Keshav.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4839902-97c8-4eb5-baa2-a080a400cfdbn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABgMPaGxNu_fgFgFytBvZ72vZBKoLBqwj7XEN%3DzaQBMGW1%2BKYw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

RE: one downstream with multiple upstreams(all upstreams should be success)

Reinhold Füreder

Hi Keshav,

 

sorry for interfering, but I think Gianluca’s pseudo code and hint should actually help you:

  • Job A will wait for both job B and job C to be finished
  • and only if both were successful, then and only then continue with triggering job D in the next stage

 

HTH Reinhold

 

 

From: [hidden email] <[hidden email]> On Behalf Of chenna kesavulu
Sent: Dienstag, 1. September 2020 22:23
To: [hidden email]
Subject: Re: one downstream with multiple upstreams(all upstreams should be success)

 

Hi Gianluca,

 

I can't trigger Job D directly from Job A. Actually in my project we are running integration tests in Job B and UI tests in Job C. So if both the builds are green then only  i can merge the code to master in Job D. But thanks for your answer I will try it.

 

Thanks,

Keshav.

  

 

On Wed, Sep 2, 2020 at 1:26 AM Gianluca <[hidden email]> wrote:

Hi,

why not triggering Job D directly from job A ? In this way, if you put that in a stage after job B and job C is triggered ... it will only be triggered if both succedded:

 

stage("Run B and C") {

  steps {

    parallel(

      "job B": { buildJob ... },

      "job C:" { build Job ... },

}

 

stage("Run D") {

  steps {

   // this will run only if both Job B and C succeed

    buildJob
  }

}

 

Cheers,

Gianluca.

 

Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto:

Hi,

 

i have stuck with a small issue... i have a job A which triggers job B and job C. for job B and job C downstream job is job D.... i need this job D is to be triggered when job B and job C both are success. i have tried with "Build after other projects are build" with "trigger only if build is stable" option. its not working for me... the job is getting triggered even one of jobs is success. can some one please help me on this..........

 

Thanks,

Keshav.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4839902-97c8-4eb5-baa2-a080a400cfdbn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABgMPaGxNu_fgFgFytBvZ72vZBKoLBqwj7XEN%3DzaQBMGW1%2BKYw%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/DBAPR01MB6631ABF8C17E930FD2B78295F72F0%40DBAPR01MB6631.eurprd01.prod.exchangelabs.com.
Reply | Threaded
Open this post in threaded view
|

Re: one downstream with multiple upstreams(all upstreams should be success)

Ven H
Hi,

How about using "wait" and "propagate" attributes on build step? Can you check if these help in your case?

Regards,
Venkatesh


On Wed, Sep 2, 2020 at 12:00 PM Reinhold Füreder <[hidden email]> wrote:

Hi Keshav,

 

sorry for interfering, but I think Gianluca’s pseudo code and hint should actually help you:

  • Job A will wait for both job B and job C to be finished
  • and only if both were successful, then and only then continue with triggering job D in the next stage

 

HTH Reinhold

 

 

From: [hidden email] <[hidden email]> On Behalf Of chenna kesavulu
Sent: Dienstag, 1. September 2020 22:23
To: [hidden email]
Subject: Re: one downstream with multiple upstreams(all upstreams should be success)

 

Hi Gianluca,

 

I can't trigger Job D directly from Job A. Actually in my project we are running integration tests in Job B and UI tests in Job C. So if both the builds are green then only  i can merge the code to master in Job D. But thanks for your answer I will try it.

 

Thanks,

Keshav.

  

 

On Wed, Sep 2, 2020 at 1:26 AM Gianluca <[hidden email]> wrote:

Hi,

why not triggering Job D directly from job A ? In this way, if you put that in a stage after job B and job C is triggered ... it will only be triggered if both succedded:

 

stage("Run B and C") {

  steps {

    parallel(

      "job B": { buildJob ... },

      "job C:" { build Job ... },

}

 

stage("Run D") {

  steps {

   // this will run only if both Job B and C succeed

    buildJob
  }

}

 

Cheers,

Gianluca.

 

Il giorno martedì 1 settembre 2020 alle 19:52:49 UTC+1 chenna keshav ha scritto:

Hi,

 

i have stuck with a small issue... i have a job A which triggers job B and job C. for job B and job C downstream job is job D.... i need this job D is to be triggered when job B and job C both are success. i have tried with "Build after other projects are build" with "trigger only if build is stable" option. its not working for me... the job is getting triggered even one of jobs is success. can some one please help me on this..........

 

Thanks,

Keshav.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4839902-97c8-4eb5-baa2-a080a400cfdbn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABgMPaGxNu_fgFgFytBvZ72vZBKoLBqwj7XEN%3DzaQBMGW1%2BKYw%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/DBAPR01MB6631ABF8C17E930FD2B78295F72F0%40DBAPR01MB6631.eurprd01.prod.exchangelabs.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPp28eo%2B3V8mFqSwTekqiN80ziigh5_6p8mwweQd%2BVbtDE3SRA%40mail.gmail.com.