How to use the Jenkins Artifactory plugin with examples [Video]

Ohad Levy
2021-02-02 19:45


Video Transcription

Hello everyone. My name is Ohad from JFrog support. Today I am going to show you a quick demo about the Jenkins Artifactory plugin, along with the Maven example build. Once you have Artifactory and Jenkins up and running, you will also need to install the Jenkins Artifactory plugin on Jenkins. To do that, simply go to manage Jenkins. Next, choose managed plugins. Choose available in right Artifactory. I already have it installed. Next we will create a Jenkins build. Choose new item, give it a name. I’m going to go to Maven pipeline example. Choose pipeline and press okay at the bottom.

Next, we will go to the Jfrog GateHub project example page. Here, you can find several examples of builds for different package types. For this example, we will use Maven. So we’re going to go to Jenkins examples. I’m going to choose pipeline examples, scripted examples, going to go to Maven examples. And here we have the Jenkins file.

We’re going to copy the content of that file to visual studios and edit it there. So for the URL I inputted, the Artifactory URL. So mine is on local host, and on port 8-81. I inputted the username is admin. Password is password.

We’re just going to go over the different stages here. So we have the clone from gate and next we have the Artifactory configuration. So the, RT Maven tool needs to be the name of the tool that’s configured in your Jenkins application. But for the deploy repository, we’re going to configure libs release local as the deployer for release jars. For snapshot jars, we’re going to deploy them to the lib-snapshot local. For resolvement of packages, it’s going to be lib-release. For non-snapshot jars and for snapshots jars, it’s going to be lib-snapshot. Next we’re defining in Artifactory and new build info. In the next stage is the name execute. We’re executing the Palm XML file from the Maven example directory, which is inside the project example project. We’re going to run a clean install goal on this project, and it’s all this info is going to be inputted into the build info.

And the last stage will be to publish this built info to Artifactory. They’ve copied the script to our build. We’re going to save. We’re going to press build now, and we’re going to give it a few seconds to run this build and complete it. So it’s cloning. Next is executing the Maven. And it’s polishing the build in Artifactory. Okay. We’re going to go back to Artifactory. Going to log in.

I’m going to close this. We’re going to go through the builds. We’re going to press the build name. The build ID. And here it is in the different modules. We’re going to put the first module. And we can see the different items that were accredited by the build. You can see a jar. We’re going to go to the show in tree, to see that jar in its repository. And here we are. Thank you for watching. Have a great day.