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

Document creation of Secret File or Secret Text credentials (plain-credentials) plugin via API

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • credentials-plugin
    • None

      While reading https://github.com/jenkinsci/credentials-plugin/blob/master/docs/user.adoc#creating-a-credentials, I only found documentation of how to possibly create a username + password credentials, but no example of how to create a secret file or secret text credential.

      Googling around, I found

      https://www.linkedin.com/pulse/upload-jenkins-secret-file-credential-via-api-maksym-lushpenko/

      Well, the author also seemed quite frustrated while looking for a solution. But the help of that blog post, I - at least - am able to create a secret file credential.

      But updating it (using the path .../<my_credential_id>/update ) and passing it the same values does not work, although Jenkins is returning a 200 back.

       

      Please properly document, how to create and update a credential of type secret file ( org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl ) and secret text ( org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl ) via the API

       

      My attempts to resolve this via reverse engineering failed so far.

       

      Thanks

      pasche

            Unassigned Unassigned
            pasche Robert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: