Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
As of now Package Drone's channels can be enhanced by using "aspects". These alter the state of a channel but work more like a passive element during the whole process.
Sometimes it is necessary to execute actions triggered be certain conditions. These actions are executed at a specific time and do not necessarily alter the state of a channel.
A trigger is more like "if this, then that". While an aspect Always transforms the channel in the same way, there is no operation involved.
There are two classic examples in Package Drone which failed this idea. The "Tycho Cleaner" and the "Cleanup" aspect. Those were implemented as an aspect (due to the missing trigger system back then) but did not produce the same channel state when removing and re-adding those aspects.
Also can aspects only be added once to a channel, leading to the trouble of only having a single cleanup configuration (see also issue ctron/package-drone#94).
There should be a trigger system which allows:
This change does implement the first part of a trigger system. It does provide internal triggers, actions/processors and an API and Web UI to configure those. Missing from this change is the implementation of the "configurable triggers".
The change sums up several changes for implementing configurable triggers. It is possible to configure triggers in addition to the built-in triggers, which get instantiated by factories. For testing an "HTTP endpoint" trigger as added which gets fired when then configured HTTP endpoint is called.
This change will refactor common parts of the cleanup aspect to a common bundle and will then implement both the existing cleanup aspect and the new cleanup processor based on this common base. The new cleanup processors works exactly the same as the cleanup aspect but now it is possible to have multiple instances of the cleanup functionality, in different configuration and being able to execute those at different times.