简体   繁体   English

詹金斯和Artifactory

[英]Jenkins & Artifactory

On a server running ubuntu 12.04 I have installed jenkins 1.532.1 and artifactory 2.6.4. 在运行ubuntu 12.04的服务器上,我安装了jenkins 1.532.1和artifactory 2.6.4。

Both of then are running fine separately. 两者都分别运行良好。 I also have maven 2. 我也有maven 2。

With jenkins, I can build maven java project with sources on subversion. 使用jenkins,我可以使用subversion上的源代码构建maven java项目。 With maven I can use Artifactory. 有了maven,我可以使用Artifactory。

The problem is with the artifactory plugin for jenkins. 问题在于jenkins的神器插件。 I added an artifactory server with credentials. 我添加了一个带有凭据的神器服务器。 Using connection check tell me : "Found Artifactory 2.6.4". 使用连接检查告诉我:“找到Artifactory 2.6.4”。 It seems to be ok. 好像没问题。

But when I create a maven job, in post build actions, I choose Deploy artifacts to artifactory. 但是当我创建一个maven作业时,在后期构建操作中,我选择Deploy artifacts to artifactory。 My server is already selected in the artifactory server but nothing is available in the repositories. 我的服务器已在artifactory服务器中选中,但存储库中没有任何可用的服务器。

What can I do. 我能做什么。 Do I have to configure something special in Artifactory ? 我是否必须在Artifactory中配置一些特殊的东西?

I had also this issue, the problem comes from a refresh of Jenkins Plugin. 我也有这个问题,问题来自刷新Jenkins插件。

To deal with that issue, you should: 要解决这个问题,你应该:

  1. open your job 打开你的工作
  2. add a task for artifactory 为artifactory添加任务
  3. save your job 保存你的工作
  4. Open again your job 再打开你的工作

Now you should be able to see your repositories. 现在您应该能够看到您的存储库。

Conclusion: You should add/save and reload your job to see your list of repo of artifactory. 结论:您应该添加/保存并重新加载您的作业,以查看您的神器回购列表。

I also have this problem, when switching from one artifactory server to another and it looks like a bug for me. 我也有这个问题,当从一个神器服务器切换到另一个神器服务器时,它看起来像我的错误。 But if I save the settings once without a "non-selectable" repository and access the configuration of the job again, the repositories will be shown. 但是,如果我在没有“不可选”存储库的情况下保存设置一次并再次访问作业配置,则会显示存储库。

Ok, so after a very long time I tried again and ... I don't know why but now (I'm quite sure it was not working few months ago) the solution given by aorfevre and user3424040 are working. 好吧,所以经过很长一段时间我再次尝试...我不知道为什么但现在(我很确定它几个月前没有工作)aorfevre和user3424040给出的解决方案正在运行。

I have also upgraded jenkins to 1.565.1 and the artifactory plugin to 2.2.3 and now there is a Refresh Repositories button in the Deploy artifacts to Artifactory task. 我还将jenkins升级到1.565.1,将artifactory插件升级到2.2.3,现在Deploy artifacts to Artifactory任务中有一个Refresh Repositories按钮。

For the "Generic-Artifactory Integration" I had to configure Artifactory a bit. 对于“Generic-Artifactory Integration”,我必须稍微配置Artifactory。 I added a group 'deployers' and a user 'deploy' in that group. 我在该组中添加了一组“部署者”和一个用户“部署”。 Also I added a Permission Target for the LOCAL repositories where the group was granted deploy permissions. 此外,我还为LOCAL存储库添加了权限目标,其中该组被授予了部署权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM