Artifactory server not avaiable on Jenkins - jenkins

I am new to Jenkins and currently following a tutorial on how to intergrate it with artifactory. I have installed both my artifactory and Jenkins on the same server. I have also installed the artifactory plugin on the Jenkins server.
Unfortunately when i get to the section where i need to select the artifactory server, the drop down menu doesnt show the it.
Below is a screenshot image of what i am referring to.
Jenkins Server Build image

You need to first add an Artifactory server under Manage Jenkins -> Configure System - you'll find the Artifactory section there where you can add servers.
You should probably go over the plugin's own documentation, it outlines the process in detail.

Related

How to place an artifact in a remote server and unzip

Hi have requirement to Continous deployment using Jenkins and below are the steps to achieve.
1.Jenkins job download the artifact from Nexus and place it in a remote server
2.Unzip the artifact present in the remote server.
3.Perform Gradle task in remote server
You could try using Ansible maybe https://docs.ansible.com/ansible/latest/modules/copy_module.html
If it is Windows:
https://docs.ansible.com/ansible/latest/modules/win_unzip_module.html
You have modules for every situation:
https://docs.ansible.com/ansible/latest/modules/modules_by_category.html
You could do it with Jenkins, scripting the code, and probably storing the login in the Jenkins credentials.

Jenkins Build Trigger "Enable Artifactory trigger" is not working with JFrog

We are using JFrog as artifactory and Jenkins is our CI/CD tool. I have created a Jenkins which should run upon an artifact gets published to jfrog artifactory. But seems to be the plugin is not working as expected. When i googled, found the below URL and as per URL its applicable only for JFrog Pro-version. https://www.jfrog.com/jira/browse/HAP-1138
My question is, this option applicable only for JFrog pro-version or am i missing something here.
Thanks,
Srikanth.
The Artifactory Trigger feature in Jenkins, allowing to trigger Jenkins jobs following changes in pre-configired paths in Artifactory, requires at least an Artifactory Pro license.

Nexus integration with Jenkins

Is there a way to list all the version uploaded in Nexus repositories.
I am working with Jenkins, and trying to show the versions uploaded in Nexus repositories.
EDIT:
I am not using MAVEN releases, i have the compresses files as zip.
The format we have is ,
ABCD releases
com.abc.abcd
appname
v1.0.0
app_v1.0.0.zip
How do i use Repository connector /Artifact resolver to configure to list all the releases under ABCD releases.
yes with jenkins nexus plugin you can make a parametrized job to display a specific version before the job start.
more detail look at this page
https://wiki.jenkins-ci.org/display/JENKINS/Repository+Connector+Plugin

How to trigger a Jenkins build on a new artifact in Artifactory?

Can Artifactory be used as "SCM" or source in Jenkins to trigger the builds on an particular artifact deploy?
Don't see (or miss it) anything similar in the Artifactory Jenkis plugin description (and on Jenkins side)
This could be needed for instance if there is only access to the Artifactory repository and not to the SCM with code the binaries are coming from.
Such functionality looks to be availble for Nexus (via nexus-webhook-plugin). Hard to believe that this feature is missing for Artifactory.
It's maybe not as elegant as a hook, but I believe the URLTrigger Plugin will achieve what you're looking for. Listed in their use cases:
This plugin enables users to check if new artifacts (such as binaries) have been deployed in a repository (managed for example by a repository manager such as Sonatype Nexus, JFrog Artifactory, Apache Archiva and so on).
It allows you to check the last modification date and inspect the contents of the response for changes.
You would have to use a polling interval instead of relying on Artifactory to notify Jenkins via a hook, but in my experience polling is relatively innocuous even with lots of polls at high intervals.
Now you can use Enable Artifactory trigger in a newer version.
Go to Build Triggers and check the Enable Artifactory trigger checkbox.
More Detail on GitHub Support for Artifactory trigger

Jenkins & Artifactory

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 ?
I had also this issue, the problem comes from a refresh of Jenkins Plugin.
To deal with that issue, you should:
open your job
add a task for artifactory
save your job
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.
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.
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.

Resources