Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve build data again when the slave is known #19

Closed

Conversation

fungusakafungus
Copy link

When using the build wrapper functionality ("Send console log to Logstash" checkbox), the reported buildHost and buildLabel is master as the slave is not known at the time jenkins.plugins.logstash.LogstashWriter#buildData is initialized.

This PR checks if current line contains "Building remotely" and retrieves buildData again, to have it filled with slave data.

This might be not an abstracted configurable solution, but it works for us. Maybe someone has an idea how to make this generally useful. Maybe retrieve buildData every time a line is logged?

@oleg-nenashev
Copy link
Member

It seems to be a pretty hackish approach. The best way to have it implemented is to have a reverse trigger (onActionAdded listener). But I am not sure there is such feature i n the core, need to check it

@jakub-bochenski
Copy link

Closing in favour of #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants