Linux Programmer | RHCE | RHCSA

Search This Blog

Monday 20 January 2020

Configure Jfrog Artifactory with Jenkins

1. Download and configure JFrog Artifactory
Following are the steps to download and create repositories and configure permissions to certain users in JFrog Arifactory:
a. Download the JFrog artifactory .zip folder from https://bintray.com/jfrog/artifactory/jfrog-artifactory-oss-zip/4.15.0
b. Extract the .zip folder in your system. Go to the Bin folder and execute artifactory.bat
c. Go to the browser and visit localhost:8081 in order to visit to the artifactory in browser.


d. Log in as admin by providing the default credentials:
Username: admin
Password: password
e. You can create a Local repository to store package files created by the Jenkins/Maven project:
Go to Admin -> Repositories ->Local -> New


f. Select Maven


g. Provide key (name: Jenkins-integration) for your repository and check Handle Release and deselect Handle Snapshot.


h. Similarly create another local repository with key (e.g. Jenkins-snapshot) and check Handle Snapshot while deselecting Handle Release.
i.Create a user that you can utilize from Jenkins to access Artifactory:
Go to admin -> Security -> users -> Click on NEW from Users management window -> Add new user->Save


Verify the list of users.
j. Provide the newly created user with permissions to the repositories:
Go to admin -> security-> users
- Give the name to the permission
- Choose the repositories on which you want to set the permission
-Click save & finish


  • Check the Permissions Management section in Artifactory for recent changes:


k. Edit the permission and assign the user:


Check the Permissions Management section in Artifactory for recent changes:


Now you are ready to integrate Artifactory with Jenkins.
2. Artifactory Plugin configuration in Jenkins
a. Go to Jenkins dashboard -> Manage Jenkins -> Manage Plugins -> Available -> Artifactory -> Install with restart.


b. Configure Artifactory-related settings in Jenkins:
Go to Jenkins dashboard -> Configure System ->Artifactory section ->Add artifactory server -> provide the details -> Test the connection ->apply & save


c. Go to a Jenkins project that creates a package file after compiling all of the source files.
Go to Build Environment section -> Resolve artifacts from artifactory -> Click on refresh Repositories ->select the repository in release and snapshot field from the lists.


d. Go to Add post-build section ->select deploy artifacts to artifactory -> click on refresh -> choose the target releases and snapshot repository (repositories created earlier) ->save


e. Click on Build now and verify logs in the Console Output. Jar files are resolved from the local repository or Artifactory.
f. Once the package is created, it is stored in artifactory too. Go in the artifactory and check the package.

And Done !!!

1 comment:

SSH not working with password after upgrade ubuntu 22.04

Issue: In recent upgrade of ubuntu 22.04 we are not able to login server with SSH password. but when we try to login with key then it allow...