Jenkins post-build publishing is always performed on Master

25 views
Skip to first unread message

Rafael Ribeiro Rezende

unread,
Aug 7, 2014, 1:29:20 PM8/7/14
to jenkin...@googlegroups.com
Hello everyone,

I'm developing a plugin that work as a post-build step which generates an Ant file at build-time, depending on the artifacts generated by the respective build steps, and execute it.
This plugin extends the Recorder.

The purpose of the plugin is basically to report those selected artifacts to the IBM Rational Team Concert server using Ant Tasks provided by IBM.

The plugin works fine in a single Jenkins instance (Master-only), but I have the following issue when I add slaves...
This is the workflow:
  • Master assigns the build to a slave;
  • Slave fetches the source from SCM and build it properly (Build is done here);
  • The post-build step searches for the generated artifacts, but doesn't find any of them.
    • Here I could conclude that the plugin is actually looking for those artifacts in the Master node instead, because...
    • ...even the ant file itself was generated in the Master instead of the assigned slave.

So, my question here:

Aren't the post-build steps expected to be executed in the same node as the build steps?

I could find in this post a hint that Recorder always happen in the Master node. Is that right? If yes, what should I extend to create a publisher that is effectively executed in the same assigned slave as the build step?


Jesse Glick

unread,
Aug 7, 2014, 2:43:19 PM8/7/14
to Jenkins Dev
On Thu, Aug 7, 2014 at 10:29 AM, Rafael Ribeiro Rezende
<rafael...@gmail.com> wrote:
> Aren't the post-build steps expected to be executed in the same node as the
> build steps?

All steps are run in the JVM on the master. If you want to do
something on the slave, this is normally implicit in using FilePath
methods on the workspace, which automatically make remote calls when
the workspace is on a slave.

Rafael Ribeiro Rezende

unread,
Aug 8, 2014, 3:10:59 AM8/8/14
to jenkin...@googlegroups.com
Hello Jesse,

I think it explains...
I'm using java.io.File to generate the Ant file, instead of FilePath. I won't have access to the code again before Monday, but I believe the solution is clear now.
If you don't hear from me again, the problem is solved.

Thanks in advance!



--
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/r5yqeLWH8_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rafael R Rezende
Reply all
Reply to author
Forward
0 new messages