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

(short issue description) #29

Open
lroubeyrie-ingenico opened this issue Mar 13, 2024 · 0 comments
Open

(short issue description) #29

lroubeyrie-ingenico opened this issue Mar 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lroubeyrie-ingenico
Copy link

Describe the bug

Defining a server under Manage Jenkins | Configure System with a unique ID and its URL but without credentials, and in pipelines edit the configuration to add user/password, then subsequent 'jf' calls complaint about not finding the server URL.

Current behavior

[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] jf
[arti_test] $ docker exec --env ******** --env ******** f833c477775786725f2cca26fc80cc1f1bac9f61ce7119c2066189617626e808 /opt/jenkins/tools/io.jenkins.plugins.jfrog.JfrogInstallation/jfrog-cli/jf c add arti_server --user= ******** --url=https://my_art_server.com --artifactory-url=https://my_art_server.com/artifactory --distribution-url=https://my_art_server.com/distribution --xray-url=https://my_art_server.com/xray --interactive=false --overwrite=true
14:04:12 [Debug] JFrog CLI version: 2.53.2
14:04:12 [Debug] OS/Arch: linux/amd64
14:04:12 [Debug] Locking config file to run config AddOrEdit command.
14:04:12 [Debug] Creating lock in: /opt/jenkins/workspace/arti_test@tmp/jfrog/10/.jfrog/locks/config
14:04:12 [Debug] Releasing lock: /opt/jenkins/workspace/arti_test@tmp/jfrog/10/.jfrog/locks/config/jfrog-cli.conf.lck.9.1710338652958460070
14:04:12 [Debug] Config AddOrEdit command completed successfully. config file is released.
[arti_test] $ docker exec --env ******** --env ******** f833c477775786725f2cca26fc80cc1f1bac9f61ce7119c2066189617626e808 /opt/jenkins/tools/io.jenkins.plugins.jfrog.JfrogInstallation/jfrog-cli/jf config show
14:04:13 [Debug] JFrog CLI version: 2.53.2
14:04:13 [Debug] OS/Arch: linux/amd64
Server ID: arti_server
JFrog Platform URL: https://my_art_server.com/
Artifactory URL: https://my_art_server.com/artifactory/
Distribution URL: https://my_art_server.com/distribution/
Xray URL: https://my_art_server.com/xray/
Mission Control URL: https://my_art_server.com/mc/
Pipelines URL: https://my_art_server.com/pipelines/
Default: true

[Pipeline] jf
[arti_test] $ docker exec --env ******** --env ******** f833c477775786725f2cca26fc80cc1f1bac9f61ce7119c2066189617626e808 /opt/jenkins/tools/io.jenkins.plugins.jfrog.JfrogInstallation/jfrog-cli/jf config edit arti_server --user=my_user --password=***
14:04:13 [Debug] JFrog CLI version: 2.53.2
14:04:13 [Debug] OS/Arch: linux/amd64
14:04:13 [Debug] Locking config file to run config AddOrEdit command.
14:04:13 [Debug] Creating lock in: /opt/jenkins/workspace/arti_test@tmp/jfrog/10/.jfrog/locks/config
14:04:13 [Debug] Releasing lock: /opt/jenkins/workspace/arti_test@tmp/jfrog/10/.jfrog/locks/config/jfrog-cli.conf.lck.28.1710338653130701623
14:04:13 [Debug] Config AddOrEdit command completed successfully. config file is released.
[Pipeline] jf
[arti_test] $ docker exec --env ******** --env ******** f833c477775786725f2cca26fc80cc1f1bac9f61ce7119c2066189617626e808 /opt/jenkins/tools/io.jenkins.plugins.jfrog.JfrogInstallation/jfrog-cli/jf config show
14:04:13 [Debug] JFrog CLI version: 2.53.2
14:04:13 [Debug] OS/Arch: linux/amd64
Server ID: arti_server
User: my_user
Password: ***
Default: true

[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build and Publish)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] jf
[arti_test] $ docker exec --env ******** --env ******** f833c477775786725f2cca26fc80cc1f1bac9f61ce7119c2066189617626e808 /opt/jenkins/tools/io.jenkins.plugins.jfrog.JfrogInstallation/jfrog-cli/jf mvn --project ${PROJECT_ID} clean install
14:04:20 [Debug] JFrog CLI version: 2.53.2
14:04:20 [Debug] OS/Arch: linux/amd64
14:04:20 [Debug] Saving build general details at: /tmp/jfrog/builds/33ca3cae3fe1ba0994026d5b733bfaf6ff380687333fbea68dfce8c634937b79/partials
14:04:20 [Error] Server ID arti_server: URL is required.

Reproduction steps

Add a server configuration under Manage Jenkins > Configure System as described in the doc but without credentials.
Add pipeline steps:

        stage('Edit JFrog CLI') {
            steps {
                jf('config show')
                jf('config edit arti_server --user=my_user --password=***')
                jf('config show')
            }
        }

        stage('Build and Publish') {
            steps {
                jf('mvn --project ${PROJECT_ID} clean install')
            }
        }

Expected behavior

The user and password should be add to configuration without removing server URLs

JFrog plugin version

1.5.0

JFrog CLI version

2.53.2

Operating system type and version

Linux

JFrog Artifactory version

7.68.19

JFrog Xray version

No response

@lroubeyrie-ingenico lroubeyrie-ingenico added the bug Something isn't working label Mar 13, 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