Jenkins Artifactory Plugin与新版Artifactory兼容问题求助
Hey there, let’s work through this issue together. Since your upload pipeline was rock solid before the Artifactory update and broke immediately after moving to 5.8.4, we can focus on compatibility, configuration, and connectivity gaps introduced by the upgrade. Here’s what to check first:
Common Causes & Fixes
1. Plugin-Artifactory Compatibility Mismatch
Your Jenkins Artifactory plugin (2.14.0) is roughly contemporary with Artifactory 5.8.4, but even minor version gaps can cause API misalignment. Artifactory 5.x rolled out several REST API tweaks that older plugin versions might not handle gracefully.
- Action: Upgrade the Artifactory plugin to a version explicitly compatible with both Jenkins 2.69 and Artifactory 5.8.4. Since Jenkins 2.69 is quite old, stick to plugin releases from 2018-2019 (e.g., 2.16.0 or 2.17.0—these versions were tested against Artifactory 5.x).
- How: Head to Jenkins → Manage Plugins → Updates, search for "Artifactory", install the compatible update, then restart Jenkins and re-run your build.
2. Authentication or Permissions Got Reset
Artifactory updates sometimes tweak security settings, or service account credentials can get invalidated accidentally.
- Checks:
- Confirm the Jenkins service user (configured in your Artifactory plugin settings) has Deploy permissions on the target repository. Double-check in Artifactory’s Security → Users section.
- Test the connection directly from Jenkins: Go to Manage Jenkins → Configure System → Artifactory, find your server config, and click "Test Connection". If this fails, your credentials are the problem.
- Fix: Re-enter the user’s API key or password, re-verify permissions, and test the connection again.
3. Repository Configuration Changes
It’s easy for repository settings to get reset during an upgrade—here’s what to verify:
- Ensure the target repository name in your Jenkinsfile matches exactly what’s in Artifactory (typos or renamed repos are a common culprit).
- Check that the repository is still set to accept deployments (some updates flip repos to read-only by default).
- Confirm the repository has enough storage space—Artifactory blocks uploads if it’s out of disk.
- Action: Head to Artifactory → Admin → Repositories to cross-check all these settings, then adjust your Jenkinsfile if needed.
4. Custom Upload Logic Clashing with New API
If your Jenkinsfile uses custom curl or scripted uploads instead of the plugin’s built-in steps, Artifactory 5.x might have changed the API endpoints you’re hitting.
- Fix: Switch to the official plugin steps like
rtUpload—these are maintained to stay in sync with Artifactory API changes. Here’s a quick example of valid syntax:rtUpload( serverId: 'YOUR_ARTIFACTORY_SERVER_ID', spec: '''{ "files": [ { "pattern": "target/*.jar", "target": "libs-release-local/com/yourcompany/yourapp/${BUILD_NUMBER}/" } ] }''' ) - Make sure
serverIdmatches the ID you set up in Jenkins’ Artifactory configuration.
5. SSL Certificate or Network Issues
If you’re using HTTPS, Artifactory updates sometimes replace SSL certificates, which Jenkins might not trust.
- Checks:
- Test connectivity from the Jenkins server to Artifactory with
pingortelnetto rule out network blocks. - Verify Jenkins trusts Artifactory’s new SSL certificate—if not, uploads will fail silently or with vague errors.
- Test connectivity from the Jenkins server to Artifactory with
- Fix: Import the new certificate into Jenkins’ Java truststore (usually at
$JENKINS_HOME/jre/lib/security/cacertsor your system’s default truststore), then restart Jenkins.
Troubleshooting Pro Tips
- Enable debug logging for the Artifactory plugin in Jenkins: Go to Manage Jenkins → System Log → Add Log Recorder, name it something like "Artifactory Debug", add the logger
org.jfrog.hudsonwith levelDEBUG. Run your build again—these logs will show detailed error messages that Artifactory’s own logs might miss. - Test uploads manually from the Jenkins server using the
jfrog rt uploadcommand. If this works, the issue is with your Jenkins pipeline configuration; if not, it’s an Artifactory server or network problem.
内容的提问来源于stack exchange,提问作者Michael Lihs

