Re: How do you deploy maven artifacts to staging/production?
Re: How do you deploy maven artifacts to staging/production?
- Subject: Re: How do you deploy maven artifacts to staging/production?
- From: Ramsey Gurley <email@hidden>
- Date: Mon, 28 Mar 2016 10:46:10 -0700
On Mar 28, 2016, at 10:25 AM, Andrus Adamchik <email@hidden> wrote:
> As a long-time user of maven-release-plugin and various maven repos , I have a mixed feeling about them. They are ok for releasing *libraries*, but are much less practical for *apps*.
Yeah, that’s another thing. I want release versions of applications so I can release them to staging or rollback if bad things make it to production, but I don’t want a pile of them going back to the beginning of time. Our build server is always out of disk space and all the versioning won’t help that. Nexus has automated tasks that are supposed to be able to do this, but so far, deleting releases only worked with a rm -rf on the command line.
> Our latest solution for the apps is centered around a CI server (Bamboo in our case, but can be Jenkins, etc.) instead of Nexus / maven-release-plugin. We replaced SNAPSHOT versions of the apps with a build number variable (incremented by CI). E.g.:
>
> <version>1.0.${build-number}</version>
>
> Maven hates that, printing warnings and all, but it still works. Once you start using this scheme and setup a CI server, you have a unique version for each SCM commit sitting on the CI server.
I’m looking at the Jenkins release plugin to do this. I haven’t tried it yet, but the idea is I will build snapshots of all branches, but can run a maven release from master on demand. I don’t think I will want to deploy snapshots to nexus, because we are always starved for disk space. Just a clean verify to make sure the build is good from commit to commit.
> And that you can deploy as you wish. Since CI allows to run scripts, it can help you to do the actual deployment as well. E.g. our QA can now track individual bug fixes by commit id, and deploy corresponding versions of the app with a button click.
Right now, that’s what we do. We have the Jenkins batch tasks plugin and we set up deploy scripts using rsync. With the actual artifacts living on Nexus now, I started to think maybe I should be triggering a script on the deployment server to pull the artifacts down from nexus and put them in the appropriate places instead.
In the long run, I’d like to do this with docker and have a local docker repository with versioned application containers instead. I’ve got to make maven work first so I can put this stage behind me and move on to that.
>
> Andrus
>
>
>> On Mar 28, 2016, at 7:39 PM, Ramsey Gurley <email@hidden> wrote:
>>
>> I have a multi-module project that builds with maven. Using the maven release plugin, I’ve found I can increment the version and store the final artifacts to nexus.
>>
>> Now I want to take those artifacts from nexus, and deploy them into staging/production. I’m having a bit of trouble googling for said strategies, because the words deploy and release are used heavily and with different meaning with maven.
>>
>> I need to be able to deploy individual modules separately. I want to be able to deploy any version available on nexus. I need to deploy different versions to staging and production. I’m brainstorming ideas and thought it might be helpful to see what others are doing. So, how do you guys do it?
>>
>> Thanks,
>>
>> Ramsey
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden