You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Simon Lin <no...@gmail.com> on 2010/08/11 19:07:27 UTC

Looking for suggestion on publishing artifacts for different environments

Hi,

I wonder what's the best practice to publish artifacts for different environments such as dev, QA and production.  I tried to use extra attribute.  But it doesn't seem to work.  Or should I just publish to different directories on the repository?

Thanks.

Re: Looking for suggestion on publishing artifacts for different environments

Posted by Simon Lin <no...@gmail.com>.
Great.  Thanks.

On Aug 11, 2010, at 10:25 AM, Mitch Gitman wrote:

> One best practice, I believe, is to coordinate the
> /ivy-module/info@statusattribute with your environment. The typical
> status values are:
> integration
> milestone
> release
> 
> This means that, when you're invoking ivy:deliver and ivy:publish, you're
> publishing with the status appropriate for the environment.
> 
> What's more, I would recommend having separate integration, milestone, and
> release Ivy repositories and setting up chain resolvers accordingly. This
> way, you're ensured that integration artifacts are never creeping into your
> release builds.
> 
> Now, in a Subversion world, I normally see a correspondence as follows:
> integration = trunk
> milestone = branch
> release = tag
> 
> So developers and the CI server would normally being hitting an integration
> repository (possibly backed up in a chain by milestone and release
> repositories), but if you're working on a branch, you'd be hitting a
> milestone repo.
> 
> In terms of staging environments like dev, QA, production, I think the
> correspondence is roughly the same. Normally, only release builds should be
> going into a production staging environment. The key thing to me is that
> every publication to the release repo should be a "one and done" for that
> particular release.
> 
> Andrew mentions versioning, which is a whole topic unto itself, but which
> also needs to be coordinated here. I like the practice where you incorporate
> the fact that it's an integration build into the version, like 1.0-DEV or
> 1.0-CI or 1.0-SNAPSHOT. But there are other equally valid approaches.
> 
> On Wed, Aug 11, 2010 at 10:13 AM, Andrew McFague <am...@wgen.net> wrote:
> 
>> At my company, we do this using the versions, which makes sense.  I.e.,
>> production may be using 1.0 (because that's the current release), but
>> dev may be using 1.1 (because that's the future release).  This works
>> with branching because, well, its essentially a code change.  Current
>> ivy.xml points to 1.0, future ivy.xml points to 1.1.
>> 
>> I am not an Ivy expert, but the theory seems sound, and its worked well
>> for us. :)
>> 
>> Andrew
>> 
>> On 08/11/10 13:07, Simon Lin wrote:
>>> Hi,
>>> 
>>> I wonder what's the best practice to publish artifacts for different
>> environments such as dev, QA and production.  I tried to use extra
>> attribute.  But it doesn't seem to work.  Or should I just publish to
>> different directories on the repository?
>>> 
>>> Thanks.
>> 


Re: Looking for suggestion on publishing artifacts for different environments

Posted by Mitch Gitman <mg...@gmail.com>.
One best practice, I believe, is to coordinate the
/ivy-module/info@statusattribute with your environment. The typical
status values are:
integration
milestone
release

This means that, when you're invoking ivy:deliver and ivy:publish, you're
publishing with the status appropriate for the environment.

What's more, I would recommend having separate integration, milestone, and
release Ivy repositories and setting up chain resolvers accordingly. This
way, you're ensured that integration artifacts are never creeping into your
release builds.

Now, in a Subversion world, I normally see a correspondence as follows:
integration = trunk
milestone = branch
release = tag

So developers and the CI server would normally being hitting an integration
repository (possibly backed up in a chain by milestone and release
repositories), but if you're working on a branch, you'd be hitting a
milestone repo.

In terms of staging environments like dev, QA, production, I think the
correspondence is roughly the same. Normally, only release builds should be
going into a production staging environment. The key thing to me is that
every publication to the release repo should be a "one and done" for that
particular release.

Andrew mentions versioning, which is a whole topic unto itself, but which
also needs to be coordinated here. I like the practice where you incorporate
the fact that it's an integration build into the version, like 1.0-DEV or
1.0-CI or 1.0-SNAPSHOT. But there are other equally valid approaches.

On Wed, Aug 11, 2010 at 10:13 AM, Andrew McFague <am...@wgen.net> wrote:

> At my company, we do this using the versions, which makes sense.  I.e.,
> production may be using 1.0 (because that's the current release), but
> dev may be using 1.1 (because that's the future release).  This works
> with branching because, well, its essentially a code change.  Current
> ivy.xml points to 1.0, future ivy.xml points to 1.1.
>
> I am not an Ivy expert, but the theory seems sound, and its worked well
> for us. :)
>
> Andrew
>
> On 08/11/10 13:07, Simon Lin wrote:
> > Hi,
> >
> > I wonder what's the best practice to publish artifacts for different
> environments such as dev, QA and production.  I tried to use extra
> attribute.  But it doesn't seem to work.  Or should I just publish to
> different directories on the repository?
> >
> > Thanks.
>

Re: Looking for suggestion on publishing artifacts for different environments

Posted by Andrew McFague <am...@wgen.net>.
At my company, we do this using the versions, which makes sense.  I.e., 
production may be using 1.0 (because that's the current release), but 
dev may be using 1.1 (because that's the future release).  This works 
with branching because, well, its essentially a code change.  Current 
ivy.xml points to 1.0, future ivy.xml points to 1.1.

I am not an Ivy expert, but the theory seems sound, and its worked well 
for us. :)

Andrew

On 08/11/10 13:07, Simon Lin wrote:
> Hi,
>
> I wonder what's the best practice to publish artifacts for different environments such as dev, QA and production.  I tried to use extra attribute.  But it doesn't seem to work.  Or should I just publish to different directories on the repository?
>
> Thanks.

Re: Looking for suggestion on publishing artifacts for different environments

Posted by Kirby Files <Ki...@masergy.com>.
Tim Brown wrote on 08/11/2010 02:19 PM:
> Apologies for not answering your specific question, but...
>
> Don't do that!
>
> Externalize your configuration and produce a single binary for all
> environments.

I'm pretty sure you misunderstood the question. I don't think Simon 
was intending on embedding different configurations into his artifacts 
intended for different environments.

Rather, I think that, like most of us, he has different development 
phases, in which it may not be appropriate to use the 
latest.integration, SNAPSHOT, etc. Sometimes the publication status 
isn't enough to handle the complexity of different dev, qa, and 
production builds.

Personally, I use a single repo and use publication status to retrieve 
the artifact appropriate to the development phase, but I can see how 
in a larger enterprise, the situation may be more complicated.

Thanks,
--kirby

Re: Looking for suggestion on publishing artifacts for different environments

Posted by Simon Lin <no...@gmail.com>.
I'll try.  But I'm actually working on a Visual C++ project.  I'm not sure whether I can do that or not.

On Aug 11, 2010, at 11:19 AM, Tim Brown wrote:

> Apologies for not answering your specific question, but...
> 
> Don't do that!
> 
> Externalize your configuration and produce a single binary for all
> environments.
> 
> Your build and deploy processes will be simpler and quicker.
> 
> On Aug 11, 2010, at 10:07 AM, Simon Lin <no...@gmail.com> wrote:
> 
>> Hi,
>> 
>> I wonder what's the best practice to publish artifacts for different
>> environments such as dev, QA and production.  I tried to use extra
>> attribute.  But it doesn't seem to work.  Or should I just publish
>> to different directories on the repository?
>> 
>> Thanks.


Re: Looking for suggestion on publishing artifacts for different environments

Posted by Tim Brown <tp...@gmail.com>.
Apologies for not answering your specific question, but...

Don't do that!

Externalize your configuration and produce a single binary for all
environments.

Your build and deploy processes will be simpler and quicker.

On Aug 11, 2010, at 10:07 AM, Simon Lin <no...@gmail.com> wrote:

> Hi,
>
> I wonder what's the best practice to publish artifacts for different
> environments such as dev, QA and production.  I tried to use extra
> attribute.  But it doesn't seem to work.  Or should I just publish
> to different directories on the repository?
>
> Thanks.