1
votes

I'm working on a project where I need to publish build artifacts produced by TeamCity to Artifactory

We have a Visual Studio WebForms solution, and the there is no custom Build Script. We use default Visual Studio Build runner in Team City.

In the Build step, under Deploy Artifacts To Artifactory section, (which appears after I integrate Artifactory with TeamCity) under Custom published artifacts I have set the following value:

WebFormTest\bin=>WebForms\bin
WebFormTest*.aspx=>WebForms

This creates a folder called WebForms in Artifactory and puts .aspx files directly under it, creates a bin sub-directory and puts all files necessary files inside it as expected.

I actually want to zip the whole WebForms folder and publish that to Artifactory instead of publishing it as a folder. How can I achieve this? Any help is highly appreciated.

2

2 Answers

1
votes

The way I address this problem is as below:

  1. Created 2 Build Configurations called Commit and Publish Artifacts
  2. In Commit, I collect artifacts into a custom folder
  3. I created snapshot and artifact dependency on Publish Artifacts, with Commit
  4. Now in the Artifactory plugin, I zip the folder and publish it to Artifactory repository.

This works exactly how I expect it to work. If anyone has better solutions, please comment.

0
votes