How to Integrate Artifactory with Jenkins?
You can install plug-in called Artifactory plug-in to integrate Artifactory with Jenkins. Let us see how to integrate Jenkins with Artifactory and able to upload any binary file such as War/Ear/Jar/Exe/DLLs from Jenkins.
Pre-requisites:
- Artifactory is already setup and running
- Create a regular artifactory admin (not default admin) user
- Jenkins setup and running
- Install Artifactory plugin in Jenkins.
go to Jenkins, Manage Jenkins, Click on Available plug-ins, type Artifactory. Click on Artifactory and click install without restart
- Configure Maven in Jenkins
Enter Name as Maven3
/usr/share/maven as MAVEN_HOME
Configure Artifactory in Jenkins:
1. Go to Manage Jenkins, Click on configure system. Look for JFrog section, click on Add JFrog Platform instance
You should get the message like below:
How to Integrate from Jenkins Job
1. Create a new free style job in Jenkins
2. Provide your repo details to check out the project you want to build
3. Go under Build environment
Select Maven 3 - Artifactory integration check box
and click on refresh Repositories and choose repos as mentioned below:
4.Click on Add Build step and choose Invoke Artifactory Maven 3
5. Enter value as below, MyWebApp/pom.xml as root POM
and goal as install
Please watch the steps in details in my YouTube channel:
Select Maven 3 - Artifactory integration check box
and click on refresh Repositories and choose repos as mentioned below:
4.Click on Add Build step and choose Invoke Artifactory Maven 3
5. Enter value as below, MyWebApp/pom.xml as root POM
and goal as install
6. Now click on Build, Jenkins should build using Maven and upload WAR file into Artifactory.
7. Login to Artifactory, Click on Artifactory --> Artifacts
That's it folks!
Please watch the steps in details in my YouTube channel:
No comments:
Post a Comment