canonical / craft-parts

https://canonical-craft-parts.readthedocs-hosted.com
GNU Lesser General Public License v3.0
11 stars 37 forks source link

add "always run" plugin hook #889

Open flotter opened 3 weeks ago

flotter commented 3 weeks ago

What needs to get done

It would be amazing if the lifecycle manager and the plugin system can provide an optional hook for calling actions that always need to take place, irrespective if source changes occurs.

It would then allow the plugin itself to decided if some work in this category is required to be repeated or not.

Why it needs to get done

Two cases:

  1. Build time GUID generation to represent a build ID, needed to be part of metadata for a specific part/plugin.

  2. Configuration changes at the craft YAML level which needs to propagate through to some parts / plugins. For example, Pebble services config included in the craft YAML could be modified, requiring the plugin re-extract the schema and update the rootfs derived config.