Most of you know Habitat Scaffolding feature. The feature is really useful, but it has known limitation: you can have only one scaffolding per package.
But what if I have multiple different build-patterns for my
plan.sh? And I want to compose them. Similar approach I saw at Debian Packaging System: it has some
deb-helpers to build git/svn/mercurial projects, build using maven/make/rake/whatever.
pkg_plugins can be successor of
Fortunately, Chef Habitat is flexible enough to work-around this. I’ve played and used plugins in my own project and can say I’m happy now.
I’m using community fork, but these plugins will work with Chef Habitat as is.
Let go through:
https://github.com/biome-sh/bio-plugin-secret - manages your secrets in
https://github.com/biome-sh/bio-plugin-wrapper - automatically wrapps an upstream package, uses packages hooks, configs, exports, binding, etc unless defined in a wrapper
https://github.com/biome-sh/bio-plugin-git-source - allows use git url in
https://github.com/biome-sh/bio-plugin-git - if project itself under git plugin helps to keep files clean by copying all files to
CACHE_DIR before build. For example, no more maven
target directories in source root.
All plugins load at
do_setup_environment() callback. And all of them has
lib/plugin.sh as main entry point.
What do you think?