Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JFROG_CLI_DEPENDENCIES_DIR defaults to /usr/dependencies when JFrog CLI is installed in /usr/bin #99

Open
nugins99 opened this issue Jul 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nugins99
Copy link

Describe the bug

We have JFrog plugin installed via RPM in /usr/bin.

When doing this, the JFrog plugin uses /usr/bin/../dependencies.

Current behavior

My Jenkinsfile has the following environment variables defined:

environment {
        JFROG_CLI_LOG_LEVEL="DEBUG"
        JFROG_CLI_HOME_DIR="${WORKSPACE}/build/.jfrog"
        JFROG_CLI_DEPENDENCIES_DIR="${WORKSPACE}/build/.jfrog/dependencies"
        JFROG_CLI_TEMP_DIR="${WORKSPACE}/build/.jfrog/tmp"
}

Running "env" in my Jenkins job yields the following output:

JFROG_BINARY_PATH=/usr/bin
JFROG_CLI_AVOID_NEW_VERSION_WARNING=1
JFROG_CLI_DEPENDENCIES_DIR=/usr/dependencies
JFROG_CLI_HOME_DIR=/home2/workspace/<project>/build/.jfrog
JFROG_CLI_LOG_LEVEL=DEBUG
JFROG_CLI_TEMP_DIR=/home2/jenkins/workspace/<project>/build/.jfrog/tmp

Relevant change:
https://github.com/jfrog/jenkins-jfrog-plugin/pull/8/files#diff-66ba23408a67cc0911950d1cad200bd33db1837503e2e5aa8c5aba38ece516ea

Reproduction steps

Use jfrog cli from RPM installed in /usr/bin

Expected behavior

If CLI is installed in /usr/bin the plugin detects that special case and uses $HOME/.jfrog or some other configurable directory that is writable by the Jenkins user.

If there is a way to properly handle this case, it should be documented where the environment variable should be set. (Setting it in the Jenkinsfile does not appear to work)

JFrog plugin version

1.5.1

JFrog CLI version

2.59.1

Operating system type and version

RHEL 8.10

JFrog Artifactory version

No response

JFrog Xray version

No response

@nugins99 nugins99 added the bug Something isn't working label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant