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

Enforce to have fieldName set

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Under an strange circumstance, after uploading a credential to Global Credentials section, Jenkins says that the credential is created and it is correct, but physically the file is not uploaded (or it is removed). In these cases the the credentials-binding-plugin fails with next exception:

      java.io.IOException: remote file operation failed: /scratch/jenkins/secretFiles/35effc3c-7cfe-4d39-ad01-720f9f0c0913 at hudson.remoting.Channel@18993415:13ca24de: java.io.FileNotFoundException: /scratch/jenkins/secretFiles/35effc3c-7cfe-4d39-ad01-720f9f0c0913 (Is a directory)
      	at hudson.FilePath.act(FilePath.java:985)
      	at hudson.FilePath.act(FilePath.java:967)
      	at hudson.FilePath.write(FilePath.java:1881)
      	at hudson.FilePath.copyFrom(FilePath.java:882)
      	at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.copy(FileBinding.java:89)
      	at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.bindSingle(FileBinding.java:60)
      	at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:126)
      	at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution.start(BindingStep.java:89)
      

      It would be great if the plugin enforce to have a fileName set, and in case of not (probably because the credentials are not there) to throw an exception explaining the situation instead of showing an exception which does not explain this situation.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Alex Soto
            Path:
            src/main/java/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl.java
            http://jenkins-ci.org/commit/plain-credentials-plugin/73e81a7581393939f1fcbd17e89b4d4ec4d22962
            Log:
            resolves issue JENKINS-30926.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Soto Path: src/main/java/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl.java http://jenkins-ci.org/commit/plain-credentials-plugin/73e81a7581393939f1fcbd17e89b4d4ec4d22962 Log: resolves issue JENKINS-30926 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Alex Soto
            Path:
            pom.xml
            src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java
            http://jenkins-ci.org/commit/plain-credentials-plugin/5bb0fe95dea9b255fd82647d3d3519ad32321d82
            Log:
            -adds test for JENKINS-30926

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Soto Path: pom.xml src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java http://jenkins-ci.org/commit/plain-credentials-plugin/5bb0fe95dea9b255fd82647d3d3519ad32321d82 Log: -adds test for JENKINS-30926
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Alex Soto
            Path:
            src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java
            http://jenkins-ci.org/commit/plain-credentials-plugin/76766cd22dd37255219a0016a6af87063bc6a379
            Log:
            JENKINS-30926 fixes blank problem in file name.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Soto Path: src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java http://jenkins-ci.org/commit/plain-credentials-plugin/76766cd22dd37255219a0016a6af87063bc6a379 Log: JENKINS-30926 fixes blank problem in file name.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            .gitignore
            pom.xml
            src/main/java/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl.java
            src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java
            http://jenkins-ci.org/commit/plain-credentials-plugin/792b70b3e5eab482c68cd86ac28c0914b5855f9c
            Log:
            Merge pull request #3 from lordofthejars/master

            [FIXED JENKINS-30926] fieldName could be blank

            Compare: https://github.com/jenkinsci/plain-credentials-plugin/compare/4cb272de423e...792b70b3e5ea

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: .gitignore pom.xml src/main/java/org/jenkinsci/plugins/plaincredentials/impl/FileCredentialsImpl.java src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java http://jenkins-ci.org/commit/plain-credentials-plugin/792b70b3e5eab482c68cd86ac28c0914b5855f9c Log: Merge pull request #3 from lordofthejars/master [FIXED JENKINS-30926] fieldName could be blank Compare: https://github.com/jenkinsci/plain-credentials-plugin/compare/4cb272de423e...792b70b3e5ea

              People

              • Assignee:
                asotobueno Alex Soto
                Reporter:
                asotobueno Alex Soto
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: