-
Bug
-
Resolution: Fixed
-
Major
-
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
- depends on
-
JENKINS-43073 Old syntax not honored for explicit single required parameter taking struct
-
- Resolved
-
- is blocked by
-
JENKINS-38037 Single parameter metasteps don't work with named-parameter symbols as of workflow-cps 2.14
-
- Resolved
-
- is blocking
-
JENKINS-30519 Declarative job properties in multibranch
-
- Resolved
-
- is duplicated by
-
JENKINS-34261 Multibranch workflow cannot setup job properties
-
- Resolved
-
-
JENKINS-32674 Pipeline Snippet generator does not create valid snippet
-
- Resolved
-
-
JENKINS-36173 Snippet Generator syntax is incorrect for properties step
-
- Resolved
-
- is related to
-
JENKINS-37477 PipelineTriggersJobProperty / pipelineTriggers() - snippet generator and syntax doc fail
-
- Resolved
-
-
JENKINS-26126 DSLD and/or GDSL
-
- In Progress
-
-
JENKINS-26343 Workflow integration for HTMLPublisher
-
- Closed
-
- relates to
-
JENKINS-51405 Snippetizer & DSL disagree on behavior of step w/ mandatory struct param + opt param
-
- Open
-
-
JENKINS-41456 Declarative: publishHTML syntax does not work in post block
-
- Closed
-
-
JENKINS-29922 Promote delegates of metasteps to top-level functions, deprecate $class
-
- Resolved
-
- links to
I seem to recall something like this affecting ServerEndpointStep/RegistryEndpointStep in docker-workflow: these steps require the parameter name to be specified. The issue here is that there is exactly one (mandatory) parameter, and it is monomorphic. For a polymorphic parameter, this code disambiguates the Map passed by Groovy, deciding whether it is the value of one parameter, or the set of all parameters. Probably that trick just does not work for the monomorphic case, yet Snippetizer assumes that it will. If I am right, either DSL or Snippetizer need to be fixed—preferably the former, so that you can actually use the shorter syntax; but this might be impossible, in which case the latter.