Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43776

Form shows one credential when xml contains none

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.46.1
      ssh-agent-plugin 1.15
      ghprb 1.36.1
      master running on Ubuntu 16.04
      Chromium 57

      I configured a job through the web UI, checked "SSH Agent" but didn't add any credentials. The saved `config.xml` file looks good:

      <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@1.15">
        <credentialIds/>
        <ignoreMissing>false</ignoreMissing>  </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

      When opening the configure web UI again the form shows one credential entry. When saving the form now (without changing anything) the credential entry is being stored in the `config.xml`:

      <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@1.15">
        <credentialIds>
          <string>xxxxx</string>
        </credentialIds>
        <ignoreMissing>false</ignoreMissing>  </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

      The expectation is that:

      • if the `config.xml` doesn't contain a credential entry the web ui should not show one and
      • opening the configure form and saving it without making any changes shouldn't add a credential entry

            Unassigned Unassigned
            dthomas Dirk Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: