ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Widmer <tom.wid...@googlemail.com>
Subject Re: TeamCity dependency tracking
Date Fri, 06 Feb 2009 11:50:03 GMT
Maarten Coene wrote:
> I don't think this is possible at the moment with Ivy.
> Please open a JIRA feature request

I thought of a workaround in case anyone is using TeamCity in the same way:

TeamCity allows you to specify a non-authenticated download path that 
doesn't trigger dependency tracking (the path contains guestAuth rather 
than httpAuth). This only works if you have guest access to artefacts 
enabled, so wouldn't necessarily work for everyone. Then, you have the 
resolver path for ivy files use the guestAuth path, and the resolver 
path for artifact files use the httpAuth path, so that only dependencies 
on artifacts (rather than ivy files) are tracked.

Tom

> ----- Original Message ----
> From: Tom Widmer <tom.widmer@googlemail.com>
> To: ivy-user@ant.apache.org
> Sent: Tuesday, December 23, 2008 10:50:09 AM
> Subject: TeamCity dependency tracking
> 
> Hi all,
> 
> I'm using a TeamCity build server as an Ivy repository for our build artifacts, and it
works very well for the job except for tracking dependencies when using a varying build version,
like 'latest.release'. To fix the problem, I need to be able to pass different log in credentials
for the ivy.xml files to the artifacts. I have a resolver for the repo like this:
> 
> <url name="teamcity" latest="latest-time">
>             <ivy pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/ivy.xml"
/>
>             <artifact pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/[artifact](.[ext])"
/>
>         </url>
> 
> I have:
> 
> <credentials host="build" realm="TeamCity"
>       username="${teamcity.auth.userId}"
>       passwd="${teamcity.auth.password}"/>
> 
> but obviously those credentials are used for both the ivy.xml files and the artifacts.
Is there any way to specify different credentials for the ivy.xml files?
> 
> 
> Background:
> 
> TeamCity has a cunning system of tracking dependencies between builds by providing build-specific
TeamCity log in credentials to your ant build script in a couple of properties (though Hudson's
system of fingerprinting is just as cunning, and would avoid the problem I'm having). Anything
downloaded with those credentials during the build gets logged by TeamCity as a dependency
of the build. I use this to have automatic tracking of any dependencies that Ivy downloads
from TeamCity (the TeamCity UI allows you to navigate to dependency builds, prevent them being
cleaned up automatically, etc.).
> 
> So, what's the problem? I recently added a nightly regression testing build that always
builds against the latest build, using latest.release. Unfortunately, this causes the build
to download the ivy.xml file from every single build that exists on the server in order to
work out which is the latest. So the regression testing build appears to depend on every single
build (though you can tell the real build by looking for the build where more than 1 artifact
is a dependency).
> 
> I've made it workable by disabling dependency cleanup prevention for that build (so at
least the regression test doesn't prevent automatic cleanup of old, unused builds), but it
would still be nice to prevent every single ivy.xml file being listed as a dependency! Two
possible fixes:
> 
> 1. Persuade Ivy to download ivy.xml files only using standard credentials, so those downloads
won't be tracked.
> 2. Persuade TeamCity to ignore downloads of ivy.xml files using the build tracking credentials.
> 
> I can't see a way to do 2, but does anyone know how to do 1?
> 
> Perhaps this is a feature request - some way to bind credentials to things other than
just hosts.
> 
> Thanks,
> 
> Tom
> 
> 
>       
> 


Mime
View raw message