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

Credentials are not properly merged when applying JCasC

    XMLWordPrintable

Details

    Description

      Currently if I manually add a credential (no matter if global domain or new domain) it is cleared after I click on Reload existing configuration in /configuration-as-code/.
      I found nothing on how existing configuration is supposed to be merged with the configuration provided as yaml in the documentation. But in the case of credentials it is sometimes desirable to allow credentials next to the ones being maintained in the configuration file.

      Attachments

        Activity

          kwin Konrad Windszus created issue -
          kwin Konrad Windszus made changes -
          Field Original Value New Value
          Labels jcasc-compatibility
          kwin Konrad Windszus added a comment - - edited

          This happens with the system provider and credentials plugin 2.3.11 and a yaml like this

          credentials:
           system:
           domainCredentials:
           - credentials:
           - usernamePassword:
           description: "..."
           id: "Jenkins"
           # https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc#docker-secrets
           password: ${ldap-password}
           scope: GLOBAL
           username: ${ldap-username}
          

          I don't know whether only the system provider is affected, but I use Jenkins in Docker locally and therefore disabled authentication, so using the User Provider is no option here.

          kwin Konrad Windszus added a comment - - edited This happens with the system provider and credentials plugin 2.3.11 and a yaml like this credentials: system: domainCredentials: - credentials: - usernamePassword: description: "..." id: "Jenkins" # https: //github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc#docker-secrets password: ${ldap-password} scope: GLOBAL username: ${ldap-username} I don't know whether only the system provider is affected, but I use Jenkins in Docker locally and therefore disabled authentication, so using the User Provider is no option here.

          People

            Unassigned Unassigned
            kwin Konrad Windszus
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: