jfrog / teamcity-artifactory-plugin

TeamCity plugin that enables traceable build artifacts with Artifactory
https://www.jfrog.com/confluence/display/JFROG/TeamCity+Artifactory+Plug-in
Apache License 2.0
42 stars 47 forks source link

Mapping branches to Artifactory Repositories #11

Open Vilmir opened 9 years ago

Vilmir commented 9 years ago

Hello! My team is using Team City 8.1.5 for packaging new component releases. We have purchased Artifactory Pro and defined a release policy for packages.

We map Git branches to Artifactory repositories similarly to this:

So now I am looking for a clean way in Team City to define the right repository to publish the packages to. For now I have not found another way than simply having 1 build config that prepares the package, and 3 build configs with an artifact dependency on the first that will publish to prod, int and dev using a VCS trigger filter with the right branch.

Is there a cleaner way to map VCS branch to Artifactory repositories with the plugin?

torsten-liermann commented 9 years ago

update Your teamcity installation and use a new version of this plugin with “dynamic mode” to specify repository names...

martosoler commented 8 years ago

I have a similar situation, should I open a new issue? Our setup is a multi-project build with gradle and Subversion. We have several feature branches from where we build our artifacts. Today we don't have artifactory in place, I'm working on creating a build pipeline that facilitates that. I thought that publishing one artifact per module and then having a build that gathers all from artifact was a good idea but I'm stuck with thinking how to handle long lived feature branches where the devs are commiting and expect a final artifact with the code pushed to the branch. Is there a way to push branch artifacts to specific folders like:

libs/{branch_name}/org/test/test.jar

And for trunk:

libs/org/test/test.jar

Is this a good idea?

Thanks

eyalbe4 commented 8 years ago

You can store your artifacts in Artifactory in a path that includes the version, or if it makes sense for your CI flow, in a path that includes the branch. One way to achieve that is to put the branch name in your grade.properties, or send its value from TeamCity to your Gradle script using system properties. Your Gradle script can then deploy to the right path in Artifactory using a Gradle Publication or Configuration.