-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
I was going through how to use wrappers in Declarative Pipeline https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Advanced looking how to use the timestamper plugin specifically. Initially I used the wrap() syntax around the classname, which provided this rather helpful error message
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 9: Invalid wrapper type 'wrap'. Valid wrapper types: [ansiColor, catchError, gitlabBuilds, gitlabCommitStatus, lock, node, podTemplate, retry, script, timeout, timestamps, waitUntil, withContext, withEnv, ws] @ line 9, column 9.
wrap([$class: 'TimestamperBuildWrapper'])
^
So there it was, I just needed to use 'timestamps' and it should work, as declarative pipeline identified it as an available wrapper.
Unfortunately when trying to do that, I received the following error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 9: Expected a wrapper @ line 9, column 9.
timestamps
^
To see if it was an issue with the timestamper plugin, I also tried it with ansiColor, which again showed above as an available wrapper
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 9: Expected a wrapper @ line 9, column 9.
ansiColor
^
It seems Declarative pipeline is identifying them as available wrappers, but unable to use them as wrappers
- links to
[JENKINS-40721] Wrappers provided by plugins not working correctly
Description |
Original:
I was going through how to use wrappers in Declarative Pipeline https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Advanced looking how to use the timestamper plugin specifically. Initially I used the wrap() syntax around the classname, which provided this rather helpful error message {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Invalid wrapper type 'wrap'. Valid wrapper types: [ansiColor, catchError, gitlabBuilds, gitlabCommitStatus, lock, node, podTemplate, retry, script, timeout, timestamps, waitUntil, withContext, withEnv, ws] @ line 9, column 9. wrap([$class: 'TimestamperBuildWrapper']) ^}} So there it was, I just needed to use 'timestamps' and it should work, as declarative pipeline identified it as an available wrapper. Unfortunately when trying to do that, I received the following error {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Expected a wrapper @ line 9, column 9. timestamps ^ }} To see if it was an issue with the timestamper plugin, I also tried it with ansiColor, which again showed above as an available wrapper {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Expected a wrapper @ line 9, column 9. ansiColor ^}} It seems Declarative pipeline is identifying them as available wrappers, but unable to use them as wrappers |
New:
I was going through how to use wrappers in Declarative Pipeline https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/Advanced looking how to use the timestamper plugin specifically. Initially I used the wrap() syntax around the classname, which provided this rather helpful error message org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Invalid wrapper type 'wrap'. Valid wrapper types: [ansiColor, catchError, gitlabBuilds, gitlabCommitStatus, lock, node, podTemplate, retry, script, timeout, timestamps, waitUntil, withContext, withEnv, ws] @ line 9, column 9. wrap([$class: 'TimestamperBuildWrapper']) ^ So there it was, I just needed to use 'timestamps' and it should work, as declarative pipeline identified it as an available wrapper. Unfortunately when trying to do that, I received the following error org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Expected a wrapper @ line 9, column 9. timestamps ^ To see if it was an issue with the timestamper plugin, I also tried it with ansiColor, which again showed above as an available wrapper org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 9: Expected a wrapper @ line 9, column 9. ansiColor ^ It seems Declarative pipeline is identifying them as available wrappers, but unable to use them as wrappers |
Assignee | Original: Andrew Bayer [ abayer ] | New: Robby Pocase [ rpocase ] |
Assignee | Original: Robby Pocase [ rpocase ] | New: Andrew Bayer [ abayer ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR #82 (Web Link)" [ 15171 ] |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |
Remote Link | New: This issue links to "CloudBees Internal OSS-1785 (Web Link)" [ 18573 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |