3
votes

On a server running ubuntu 12.04 I have installed jenkins 1.532.1 and artifactory 2.6.4.

Both of then are running fine separately. I also have maven 2.

With jenkins, I can build maven java project with sources on subversion. With maven I can use Artifactory.

The problem is with the artifactory plugin for jenkins. I added an artifactory server with credentials. Using connection check tell me : "Found 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. My server is already selected in the artifactory server but nothing is available in the repositories.

What can I do. Do I have to configure something special in Artifactory ?

4
Some things you can check: does the Artifactory user you have configured in Jenkins has enough permissions? do you see any errors in the log indicating there is an issue communicating with Artifactory? do you see the request for repositories list in the Artifactory request log? - Dror Bereznitsky
For the user right : I suppose it's ok. I created a 'jenkins' user that belongs to 'all' and 'readers'. Within artifactory I can log in and view artifatcs. There is nothing in the jenkins log. In the 'artifactory.log' I don't find anything about a request from jenkins. - tweetysat
You should look for requests from Jenkins in the request.log and access.log. In both you can see the requesting user and IP, which can help identifying the Jenkins requests - Dror Bereznitsky
Don't see anything in request.log and access.log. I don't understand. - tweetysat
There should be a request to /api/repositories. Do you see any errors in the Jenkins log? - Dror Bereznitsky

4 Answers

3
votes

I had also this issue, the problem comes from a refresh of Jenkins Plugin.

To deal with that issue, you should:

  1. open your job
  2. add a task for 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.

2
votes

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.

0
votes

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.

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.

0
votes

For the "Generic-Artifactory Integration" I had to configure Artifactory a bit. 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.