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

Snippet Generator: missing attribute names in single-entry forms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None
    • workflow 1.4..1.8

      Using the snippet generator for the HTML publisher, the generated code, yields an exception:

      hudson.AbortException: Cannot publish the report. Target is not specified
      	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
      	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
      

      Follow-up to https://github.com/jenkinsci/htmlpublisher-plugin/pull/15/files#r35805641 ...I suspect a bug in workflow, but probably it has been fixed.

      When a form/class contains only one entry, Snippet Generator provides a code without an attribute name :

      publishHtml([reportName : "", ...])
      

      After that the flow execution calls a constructor with null, because a target is missing. The right call is:

      publishHtml(target: [reportName : "", ...])```
      

      Has this bug been fixed in newer workflow versions? I suspect the answer is "no", but probably I'm doing something wrong in the code

            abayer Andrew Bayer
            oleg_nenashev Oleg Nenashev
            Votes:
            12 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: