Mulit-Branch Project Plugin and Post-build action "Publish artifacts in Maven repository (deploy)"

358 views
Skip to first unread message

Sandra Parsick

unread,
May 24, 2016, 7:17:04 AM5/24/16
to Jenkins Users

Hello,

I have following problem and maybe someone has a good idea how I can solve it.

I have a Git repository with several branches. I'd like to bring all branches under CI control. That means, after every push to the repository, indepentent in which branch, a job should check whether the build is successful. When the build is sucessful, the build artifact should be uploaded to a Maven repository. But the upload step shouldn't be done on every branch.


I have tried the Multi-Branch Project Plugin, but I couldn't find the Post-build action "Publish artifacts in Maven repository (deploy)", that I usually use in normal Maven-project build jobs. Do you have some ideas, how I can solve my problem?


Best regards,

Sandra

Thomas Zoratto

unread,
May 24, 2016, 6:14:05 PM5/24/16
to Jenkins Users
Hello, 

I think you can solve your problem and improve your CI configuration by using the Pipeline plugin and more specifically the Pipeline:Multibranch plugin.

Thomas

David Karlsen

unread,
May 24, 2016, 6:19:10 PM5/24/16
to jenkins...@googlegroups.com
afaik the post-deploy step is specific to a maven-type job
specifically, so you just need to run a normal maven command.
You could also try this option
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd
to do it at the very end of the maven build.
> --
> 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/9345dbab-587d-4199-b314-bc1a8fcfd751%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Sandra Parsick

unread,
May 25, 2016, 12:10:52 PM5/25/16
to Jenkins Users, da...@davidkarlsen.com
Thank you for your replies. I will try out both advices.

Sandra Parsick

unread,
Jun 16, 2016, 6:50:42 AM6/16/16
to Jenkins Users, da...@davidkarlsen.com
I have tried the Multi Branch Pipeline plugin. In my case it have't worked because I have to increase the timeout for cloning and at the moment it is not possible to increase the timeout because of a bug (https://issues.jenkins-ci.org/browse/JENKINS-31924).

At the end I could solve my problem with Multibranch Plugin (my original idea) after I had updated Jenkins and the Multibranch Plugin to the newest version.
Reply all
Reply to author
Forward
0 new messages