将 Artifactory 中的工件复制到远程存储库
我有以下设置:
- 用于持续构建的开发服务器,Hudson、Maven 和 Artifactory 启动并运行。
- 我能够通过 Maven 构建一个工件,并让 Hudson 将其部署到 Artifactory。
但是,我想执行以下操作:
- 在本地构建服务器上的 Artifactory 中选择一个工件。
- 将该工件部署到远程存储库,而无需进行新的构建。
我想这样做的原因是,第一台服务器是开发服务器,可以随意更改新工件。另一个服务器/存储库是公司所有工件的公共可见服务器。
我知道我能够创建第二个构建作业,但这将是重复,并且 Hudson 一次只能管理一个 Artifactory 存储库。我可以手动将该工件部署到不同的 URL,但这是错误修剪,我需要在构建服务器上登录,并且必须使用 shell 来执行此操作。
有谁知道如何最终实现目标?
I have the following setup:
- Development server for continuous build with Hudson, Maven and Artifactory up and running.
- I am able to build an artifact by Maven, and let Hudson deploy it to Artifactory.
However, I would like to do the following:
- Select an artifact in Artifactory on the local build server.
- Deploy that artifact to a remote repository without doing a new build.
The reason I want to do that is, that the first server is a development server where new artifacts are changed at will. The other server / repository is the public visible server for all artefacts of the company.
I know that I am able to create a second build job, but that would be a duplication, and Hudson is only able to manage one Artifactory repository at one time. I could deploy that artifact by hand to a different URL, but this is error prune and I need a login on the build server and have to use the shell to do that.
Has anyone an idea how to finally reach the goal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我正确理解你的问题,它看起来像是用户插件的好方案。它应该很简单,您使用搜索对象选择所需的工件,然后执行 REST PUT 调用将它们放在远程服务器上。
If I understood your question correctly it looks like a good scenario for User Plugin. It should be straightforward, you select the needed artifacts using the searches object, and then execute REST PUT call to put them on the remote server.
Maven Stage插件似乎支持这种情况: http://maven.apache .org/plugins/maven-stage-plugin/usage.html
但我不确定它是否正常工作。我目前正在努力,所以如果它不起作用,也许我会找时间纠正它。
The Maven Stage plugin seems to support this case: http://maven.apache.org/plugins/maven-stage-plugin/usage.html
but I'm not sure if it works correctly. I'm working on it currently, so if it doesn't work perhapse I will find time to correct it.