On Friday, 22 March 2013 14:44:31 UTC, [email protected] wrote: > Hi All, > > > I'm new to Jenkins and would like a little advice on how best to build, > promote, tag and release maven projects that we have in Git. > > > For re-usable library components, I envision the following: > > > Library projects follow the normal Maven major.minor.version-SNAPSHOT > versioning scheme. > > Jenkins continuously polls a Git branch of the project for changes and > triggers builds automatically. > > Every successful snapshot build publishes to Nexus. > > Nexus is configured to only retain the last N snapshots so that they don't > pile up, filling up the disk. > > > Easy peasy for nexus - apart from you can't get it to delete Nth+1 snapshot when the Nth is pushed. You need to run a scheduled task to do it (hourly/daily etc).
> Now, when the library is deemed ready/releasable I'm not clear on the > following… > > > Does the version in the pom.xml need to updated and committed to Git by > developers? i.e. outside the scope of Jenkins > > If so, that would imply that a new build (compile/test) need to be done, > no? > You alsways want a new build done. you can;t change the metadata. The exception is if you trust **all** of your dev environements and then ignore checkins by the maven release plugin.... Personally I would use Jenkins and either use the m2release plugin, or the release plugin (depending on you preference for maven2 vs freestyle jobs) > Ideally I'd like to avoid rebuilding and have some sort of manual build > promotion step. > You can't - its not the maven way and that way leads to pain and suffering and the dark side... > Specifically, I'd like for a developer to be able to click a button in > Jenkins to release/promote the library from SNAPSHOT to RELEASE, avoid > recompiling/testing and just tag Git and publish to Nexus. > see above... > Is this a good use case for the Promoted Builds Plugin, or maybe the Build > Pipeline Plugin? > it may be possible - but its a bad bad thing to do... > I suppose part of my confusion comes from a lack of understanding of where > the responsibilities should be divided between Maven and Jenkins. > > Should Maven only be used for building the artifacts? i.e. no Maven > release plugin and no SCM info in the pom.xml? > > > Jenkins can't make a maven release out of an arbitrary build. You will have to either re-implement a lot of functionality from maven into jenkins in order to do this (if you really want it) or just do it the maven way (maven release plugin) Now this means that you can only release from the HEAD of a branch in most SCMs (CVS, svn, git) so if you want to be specific about what you are releasing you will neeed to get devs to update a release branch to the state of the SCM at the checkin that corresponds to the "build" you did that was deemed good. Any insights would be most welcome. > > > Thanks, > > > Frank Grimes > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
