NullPointerException when credentialsId is null

XMLWordPrintable

      with the following:
      {{   steps {}}
      {{     withCredentials([}}
      {{       string(credentialsId: params.GITHUB_PASSWORD, variable: 'GITHUB_PASSWORD'),}}
      {{       string(credentialsId: params.GITHUB_APP_SECRET, variable: 'GITHUB_APP_SECRET')}}
          ]) {
            ansiblePlaybook(    {{      }}
              ...
            )
      {{    }}}
      {{  }}}

       

      if param.GITHUB_PASSWORD is null (not defined), a NullPointerException is raised.

      The code in com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById should check for null value of id and provide a more useful message than a stacktrace.

       

       

            Assignee:
            Unassigned
            Reporter:
            Cyril Jouve
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: