How to publish custom artifacts to Artifactory from TeamCity?

て烟熏妆下的殇ゞ 提交于 2019-12-08 10:08:10

问题


I am using Artifactory and TeamCity and have a C++ project that generates binary packages (zip). Using Artifactory TeamCity plugin I am able to publish this artifact but the problem is that it does not end up in the correct tree (organization.module.version.artifact). Next to the zip file I have also an ivy.xml file that contains information about the artifact.

<ivy-module version="2.0">
    <info organisation="com.myorg" module="MyModule"/>
    <publications>
        <artifact name="MyModule" type="zip" ext="zip"/>
    </publications>
</ivy-module>

When I look in Artifactory at the Artifact browser the uploaded zip has even no Module-Id.

Any ideas how to tell the TC plugin to make use of this configuration file so that my zip is deployed correctly?

Regards, Martin


回答1:


One solution for your problem:

  1. Make sure that your file is in the right layout after the build, for example
    workspace..\..com\myorg\MyModule\2.0\MyModule.zip
  2. Use the Ant pattern in the Artifactory plugin, in your case 'workspace.../*.zip=>

    If the right side of the pattern is left empty, the plugin will deploy the artifacts maintaining the relative path for each file.

    So in your case, the file will be stored in the Artifactory repository: repository:com->myorg->MyModule->2.0->somefile.zip



来源:https://stackoverflow.com/questions/26117100/how-to-publish-custom-artifacts-to-artifactory-from-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!