nua icon indicating copy to clipboard operation
nua copied to clipboard

Build / Plugins (buildpacks)

Open sfermigier opened this issue 2 years ago • 0 comments

Build profiles

nua-build should detect (in the absence of specific configuration in nua-config.tom) the nature of a given project. Initial projects could include:

  • Python projects (using pip, poetry or pipenv, depending on the presence of the relevant config files).
  • Node projects (using npm or yarn)
  • PHP projects (using composer)
  • Ruby projects
  • Go projects
  • Java projects (using Maven or Gradle)
  • ...

Each build profile should be managed by one or more classes. Similar code already exists in Piku (https://github.com/piku/piku/blob/master/piku.py#L341 lines 340-620).

Alternatively, we could use Heroku's buildpacks, which are public and open source.

Extensibility

Initially the code base should contain all the relevant build profiles, but eventually it should be extensible using plugins.

For plugins we should investigate first the use of Pluggy (https://pluggy.readthedocs.io/) as it's a robust and proven approach.

Full lifecycle

Each of these "build profiles" could also be linked a "run profile". It is currently less clear what this runtime profiles will be.

We need to find the best way to keep this approach consistent but also flexible, using inheritance or delegation.

sfermigier avatar Jun 03 '22 06:06 sfermigier