tehK
tehK

Reputation: 2355

Jenkins: Triggering Maven Release manually in Build Pipeline

I got a problem with my Jenkins (1.6) setup and so far haven't found a solution.

What I want to do:

I have 4 Jobs (StartJob, TestA, TestB, ReleaseJob) and I'd like to have a "pipeline", that says:

What I have tried so far

I'm using the Delivery Pipeline Plugin to be able to get a nice pipeline view and to be able to set manual triggers that you can simply define in the Post-Build Actions. This worked pretty well so far.

My first attempt at this was using the Join Plugin, which simply did not work at all. It always triggered the last build at once - no matter if "TestA" and "TestB" were actually successful.

For my second attempt I used the Multijob Plugin and defined 2 Phases: The first included only "StartJob" and the second included "TestA" and "TestB". After that I defined the "ReleaseJob" as manual trigger in the Post-build Actions. This worked ok, but I'm not at the point that if I trigger the "ReleaseJob", it will not run it as a "Maven Release".

My Questions

Additional Note:

I have not yet used the new Pipeline system in Jenkins 2 - I only just set it up for a small test. If you don't know a solution for the old Jenkins but know how to set it up as a "coded pipeline" in Jenkins 2, I'd be very interested in that as well.

Thanks a lot and cheers,

/tehK

Upvotes: 1

Views: 1066

Answers (2)

k2zinger
k2zinger

Reputation: 382

I know your question is 2 years old, but since I am wondering if you ever found a solution...

Did you try using an HTTP Post in your Post-build Actions to trigger the M2-Release-Plugin on the Jenkins job? That was my workaround since this task is probably not going to be completed by the Jenkins team in the short term.

Upvotes: 0

Dakota Brown
Dakota Brown

Reputation: 750

I think the precursor to the Pipline plugin is the Buildflow plugin which I don't see you mention having tried. There is an example in this other SO thread:

How do I make a Jenkins job start after multiple simultaneous upstream jobs succeed?

Maybe this will give you some insight into how to use it

Upvotes: 1

Related Questions