ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject Re: Problems using ivy cache with concurrent builds in a build server
Date Wed, 16 May 2012 04:18:28 GMT
Two steps here. And there are many variations on these two steps, some
potentially better than what I describe here.

First, just as a general rule, it's a good idea to configure your
continuous integration (CI) server builds consistently with how you
configure your local developer builds. This principle lends itself to
configuring the Ivy cache. So you'd make all your cache locations relative
to ${ivy.default.ivy.user.dir}. For developer builds, the default value
suffices. That's ${user.home}/.ivy2/.

The next general rule is to always make CI builds be clean builds and to
not share any work-in-progress, unpublished build output/artifacts between
jobs. You favor reproducibility over performance. So the second step is you
give each job in Bamboo its own dedicated Ivy cache, and you do
this--without modifying the build system itself--by configuring the
ivy.default.ivy.user.dir to be a child directory of a job-specific path. In
the Bamboo job configuration, you override the default behavior used by
developer builds.

On Tue, May 15, 2012 at 4:42 PM, Wagner Sales <wsales@gmail.com> wrote:

> Hi all,
>
> I have a build server thats are running Bamboo, by Atlassian. I´m
> using ivy to manage the dependencies I have between my modules. My
> scenarios are projects with a couple of modules with common
> dependencies, and each module haves a build plan ( a buid plan is a
> simple call to ant ). One of most common actions are run all plans in
> parallel. When I not run the builds in parallell, everything runs ok.
> But when in parallel, the ivy fails the resolution aparently by
> concurrency on cache.
>
> Ivy show me errors like:
>
> [ivy:resolve]                 [FAILED     ]
> org/hibernate#hibernate-core;4.0.0.Alpha3!hibernate-core.jar:
> impossible to move part file to definitive one:
>
> /app/bamboo/bamboo_home/ivy-cache/repo1/org/hibernate/hibernate-core/jars/hibernate-core-4.0.0.Alpha3.jar.part
> ->
> /app/bamboo/bamboo_home/ivy-cache/repo1/org/hibernate/hibernate-core/jars/hibernate-core-4.0.0.Alpha3.jar
> (67ms)
> [ivy:resolve]                 [FAILED     ]
> org/hibernate#hibernate-core;4.0.0.Alpha3!hibernate-core.jar:
> impossible to move part file to definitive one:
>
> /app/bamboo/bamboo_home/ivy-cache/repo1/org/hibernate/hibernate-core/jars/hibernate-core-4.0.0.Alpha3.jar.part
> ->
> /app/bamboo/bamboo_home/ivy-cache/repo1/org/hibernate/hibernate-core/jars/hibernate-core-4.0.0.Alpha3.jar
> (67ms)
> [ivy:resolve]         ==== repo1: tried
> [ivy:resolve]
>
> http://svuxqsoa5:8081/artifactory/repo1/org/hibernate/hibernate-core/4.0.0.Alpha3/hibernate-core-4.0.0.Alpha3.jar
> [ivy:resolve]
> ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]                 ::              FAILED DOWNLOADS
>  ::
> [ivy:resolve]                 :: ^ see resolution messages for details  ^
> ::
> [ivy:resolve]
> ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]                 :: savvion#blclient;7.0.2!blclient.jar
> [ivy:resolve]                 :: weblogic#webservices;9.22!webservices.jar
> [ivy:resolve]                 ::
> org/hibernate#hibernate-core;4.0.0.Alpha3!hibernate-core.jar
> [ivy:resolve]
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>
> What´s I did before ask here:
> - upgrade my ivy to latest version
> - put ant in debug mode to try to understand the problem better
>
> Tried to change my ivysettings.xml in some ways:
> - try to use diferent directories to repositoryCache and resolutionCache:
> - try to use multiple caches with diferent directories and use
> lockStrategy.
>
> After this tries, my cache configuration ( ivysettings.xml ) are this:
>
> <caches resolutionCacheDir="/app/bamboo/bamboo_home/ivy-cache/resolution"
> repositoryCacheDir="/app/bamboo/bamboo_home/ivy-cache/repository">
>    <cache name="cache-release"
> basedir="/app/bamboo/bamboo_home/ivy-cache/cache-release"
> lockStrategy="artifact-lock" />
>        <cache name="cache-releases-local"
> basedir="/app/bamboo/bamboo_home/ivy-cache/cache-releases-local"
> lockStrategy="artifact-lock" />
>        <cache name="repo1"
> basedir="/app/bamboo/bamboo_home/ivy-cache/repo1"
> lockStrategy="artifact-lock" />
>   </caches>
>
> But  the problems occurs yet.
>
> Can someone have tips to put me in a better way?
>
> Thanks in advance,
>
> Wagner Sales
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message