Not possible to add Properties for change added from GitPoller
- Dominant language
- Python
- Stars
- 5.5k
- Forks
- 1.7k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 6
Description
In some cases it would be useful to register more data with a change being added by the GitPoller.
As an example, the schedulers can add Properties for a build that is being triggered. The value(s) added might depend on a file in the commit being added, for example the content of a version file.
AFAICT the only way to currently implement something like this, is to fetch the file after the checkout step has completed, calculate the value of the Property, and then set it.
This is problematic if the calculated value (e.g. a build number) is to be shared among all the builds for that commit triggered by the scheduler. The proper place to set such a value is in the Scheduler in a addBuildsetForChanges function implementation (a callable option, and/or the use of Renderables for the schedulers properties would also be an idea IMO)
AFAICT It is not possible to implement this in GitPoller, since it is not practical to override the _process_changes function to perform extra Git operations, without duplicating the entire function, as it does not call a virtual function to perform extra operations on the change; and even if one did, the addChange function that is called does not have an argument for adding Properties.
(Concerning push change sources, they can probably add similar information in the data sent to the buildmaster.)
Contributor guide
Assessment
This issue has not been assessed yet.