如何从TeamCity将自定义工件发布到Artifactory? [英] How to publish custom artifacts to Artifactory from TeamCity?
问题描述
我正在使用Artifactory和TeamCity,并且有一个生成二进制程序包(zip)的C ++项目.使用Artifactory TeamCity插件,我可以发布此工件,但问题是它没有出现在正确的树中(organization.module.version.artifact).在zip文件旁边,我还有一个ivy.xml文件,其中包含有关工件的信息.
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>
当我在Artifact浏览器中查看Artifactory时,上传的zip甚至没有模块ID.
When I look in Artifactory at the Artifact browser the uploaded zip has even no Module-Id.
有什么主意如何告诉TC插件使用此配置文件,以便正确部署我的zip?
Any ideas how to tell the TC plugin to make use of this configuration file so that my zip is deployed correctly?
关于, 马丁
推荐答案
一种解决您问题的方法:
One solution for your problem:
- 确保构建后文件的布局正确,例如
工作区.. \ .. com \ myorg \ MyModule \ 2.0 \ MyModule.zip -
在Artifactory插件中使用Ant模式,在您的情况下为'workspace .../*.zip =>
- Make sure that your file is in the right layout after the build, for example
workspace..\..com\myorg\MyModule\2.0\MyModule.zip 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.
因此,在您的情况下,文件将存储在Artifactory存储库中: 存储库:com-> myorg-> MyModule-> 2.0-> somefile.zip
So in your case, the file will be stored in the Artifactory repository: repository:com->myorg->MyModule->2.0->somefile.zip
这篇关于如何从TeamCity将自定义工件发布到Artifactory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!