jenkinsci / jenkinsci/jfrog-plugin
Jenkins jfrog plugin stops working with error about encryption key file when multiple agents are used
- Dominant language
- Java
- Stars
- 16
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
This (closed) bug only partially addressed the issue ( https://github.com/jenkinsci/jfrog-plugin/issues/59 ). When multiple agents are used, the use of the JFrog plugin fails on the subsequent agent with the encryption key file not found error.
### Current behavior
Second agent fails with:
```
[JFrog Plugin Test] $ /home/jenkins/agent/tools/io.jenkins.plugins.jfrog.JfrogInstallation/JFrog_CLI/jf config add our-artifactory --artifactory-url $ARTIFACTORY_URL --user $ART_CREDS_USR --password $ART_CREDS_PSW
15:37:29 [Info] Trace ID for JFrog Platform logs: 7a58de8f2b30e135
15:37:29 [Error] failed to stat encryption key file '/home/jenkins/agent/workspace/DSO Team/JFrog Plugin Test@tmp/jfrog/8/.jfrog/encryption/78fe85b3-2e93-4235-a4ae-acef9468e7e8.key': stat /home/jenkins/agent/workspace/DSO Team/JFrog Plugin Test@tmp/jfrog/8/.jfrog/encryption/78fe85b3-2e93-4235-a4ae-acef9468e7e8.key: no such file or directory
```
### Reproduction steps
Failing pipeline:
```
pipeline {
agent {
label 'agent-one'
}
tools {
jfrog 'JFrog CLI'
}
environment {
ART_CREDS = credentials('artifactory-integration')
}
stages {
stage('Agent 1 Test') {
steps {
jf 'config add our-artifactory --artifactory-url $ARTIFACTORY_URL --user $ART_CREDS_USR --password $ART_CREDS_PSW'
jf 'rt ping'
}
}
stage('Agent 2 Test') {
agent {
label 'agent-two'
}
steps {
jf 'config add our-artifactory --artifactory-url $ARTIFACTORY_URL --user $ART_CREDS_USR --password $ART_CREDS_PSW'
jf 'rt ping'
}
}
}
}
```
### Expected behavior
Expected it to work like the first agent test stage.
### JFrog plugin version
1.6.1
### JFrog CLI version
2.85.0
### Operating system type and version
Debian 13
### JFrog Artifactory version
7.125.10
### JFrog Xray version
3.131.30
Contributor guide
Research direction
Start by reproducing the provided Jenkins pipeline with its two agent stages and compare the JFrog CLI configuration and encryption-key behavior between them. Trace how the JFrog plugin invokes `jf config add` when the workspace changes. Done means both agent stages complete `jf config add` and `jf rt ping` without the missing encryption key error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100