ArtifactArchiver + BuildFlow help

21 views
Skip to first unread message

Stuart Rowe

unread,
Oct 11, 2014, 5:40:00 PM10/11/14
to jenkin...@googlegroups.com
Hi, I'm trying to archive an artifact created during a build flow run. I want to archive the artifact during the run instead of post build so:
  1. I can schedule another project in the flow that needs to copy the artifact to generate a report
  2. I can copy the generated report back to the build flow project to aggregate with other artifacts

Currently I have:

...

def archiver = new ArtifactArchiver(fileName)
def launcher = new LocalLauncher(new StreamTaskListener(out))
def listener = new StreamBuildListener(out)
archiver.peform(build, build.workspace, launcher, listener)

...

But this causes:

groovy.lang.MissingMethodException: 
No signature of method: hudson.tasks.ArtifactArchiver.peform() is applicable for argument types:
  (com.cloudbees.plugins.flow.FlowRun, hudson.FilePath, hudson.Launcher$LocalLauncher, hudson.model.StreamBuildListener) 
Possible solutions: 
  perform(hudson.model.Run, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener)

I can't understand why this exception is being thrown since:
  • FlowRun is an indirect subclass of Run
  • LocalLauncher is a direct subclass of Launcher
  • TaskListener interface is indirectly implemented by StreamBuildListener
Any help would be appreciated. I'm also open to other build patterns to accomplish the same goal.

Thanks,
Stuart

Daniel Beck

unread,
Oct 11, 2014, 5:43:00 PM10/11/14
to jenkin...@googlegroups.com
peform
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Stuart Rowe

unread,
Oct 12, 2014, 10:40:41 AM10/12/14
to jenkin...@googlegroups.com
Thank you :)

On Sat, Oct 11, 2014 at 2:40 PM, Daniel Beck <m...@beckweb.net> wrote:
peform

On 11.10.2014, at 23:40, Stuart Rowe <stuar...@gmail.com> wrote:

> Hi, I'm trying to archive an artifact created during a build flow run. I want to archive the artifact during the run instead of post build so:
>       * I can schedule another project in the flow that needs to copy the artifact to generate a report
>       * I can copy the generated report back to the build flow project to aggregate with other artifacts

>
> Currently I have:
>
> ...
>
> def archiver = new ArtifactArchiver(fileName)
> def launcher = new LocalLauncher(new StreamTaskListener(out))
> def listener = new StreamBuildListener(out)
>
> archiver.peform(build, build.workspace, launcher, listener)
>
> ...
>
> But this causes:
>
> groovy.lang.MissingMethodException:
> No signature of method: hudson.tasks.ArtifactArchiver.peform() is applicable for argument types:
>   (com.cloudbees.plugins.flow.FlowRun, hudson.FilePath, hudson.Launcher$LocalLauncher, hudson.model.StreamBuildListener)
> Possible solutions:
>   perform(hudson.model.Run, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener)
>
> I can't understand why this exception is being thrown since:
>       * FlowRun is an indirect subclass of Run
>       * LocalLauncher is a direct subclass of Launcher
>       * TaskListener interface is indirectly implemented by StreamBuildListener

> Any help would be appreciated. I'm also open to other build patterns to accomplish the same goal.
>
> Thanks,
> Stuart
>
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/D986U_GYnVw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages