Jenkins Artifactory Integration Tutorial Uploading JARs |Video upload date:  · Duration: PT10M22S  · Language: EN

Configure Jenkins to upload JARs to Artifactory using plugin pipelines credentials and simple build steps

If you want your JARs to stop living on developer laptops and start living in Artifactory where they belong, this guide helps you wire Jenkins to publish artifacts cleanly. It covers the plugin install, server and credential setup, freestyle and pipeline options, upload patterns, and verification. You will keep CI and CD traceability and avoid commit mystery jars.

Quick checklist to get started

  • Jenkins with admin access and the Jenkins plugin manager
  • JFrog Artifactory server and a repository for your JARs
  • Account credentials that can upload to the target repo
  • A build tool like Maven or Gradle to produce the JARs
  • Optional pipeline knowledge to automate the whole thing

Install the Artifactory plugin in Jenkins

Open the Jenkins plugin manager and install the Artifactory plugin. This adds build steps and pipeline helpers so Jenkins can talk to Artifactory without duct tape or ritual sacrifice. Restart if prompted and verify the plugin shows up under installed plugins.

Configure the Artifactory server and credentials

Go to the global configuration for the Artifactory plugin and add your Artifactory server entry. Then add credentials in the Jenkins credentials store. Use a service account or API key instead of a personal password for safer automation. Make sure the credentials have push permissions to the target repository.

Create a job or pipeline

You can do this one of two ways

  • Freestyle job. Add the Artifactory deploy or publish step in post build actions. Good for simple builds or GUI lovers.
  • Pipelines via Jenkinsfile. Recommended for CI CD workflows and versioned pipelines. The plugin exposes helpers you can call from scripted or declarative pipelines to upload artifacts and capture build info.

How to add the upload step

Tell the pipeline or job which JAR files to push and where to push them. Use file patterns to avoid uploading the wrong binary by accident. Define the target repo name so artifacts land where intended. For pipelines use the plugin helper name or the server upload helper that the plugin provides.

Example upload spec described in plain terms

Instead of showing exact code which may vary by plugin version, here is the structure to provide

  • pattern equals target/*.jar to match the built JARs
  • target equals libs-release-local/myapp to choose the repository path
  • optionally set properties or metadata to tag the upload with build number and commit id

Use the Maven or Gradle integration when applicable

If your project builds with Maven or Gradle use the Artifactory resolver and publisher steps. These capture full build info which makes traceability and dependency resolution much nicer in CI and CD pipelines. The publisher will upload artifacts and record resolved dependencies so you can answer questions like which commit produced which JAR.

Verify the upload and metadata

After a run check Artifactory for the uploaded JARs. Confirm checksums and that build info lists the artifact. If you enabled build info collection you should see the connection between commit, build number, and the published JAR. If something did not land where expected check file patterns and target repo names first then permissions.

Troubleshooting tips

  • Authentication failures usually mean wrong credentials or missing permissions
  • Empty uploads often mean your file pattern did not match the artifact path
  • Missing build info means you used a naive upload step instead of the plugin publisher or resolver

Best practices to avoid future pain

  • Collect build info so your DevOps team can trace artifacts back to builds and commits
  • Tag uploads with build numbers and commit ids so rollbacks and audits are easier
  • Use service accounts and API keys for CI CD automation rather than personal credentials
  • Prefer pipeline based publishes for reproducible builds and version controlled Jenkinsfiles

Follow these steps and your Jenkins pipelines will deliver JARs to Artifactory reliably. You will get traceable binaries, fewer mysterious failures, and the faint satisfaction of knowing your CI and CD pipelines are not a house of cards. Now go build something that does not explode in production.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.