oar-team / kameleon

The mindful appliance builder
http://kameleon.imag.fr
GNU General Public License v2.0
13 stars 3 forks source link

add generic section definition and optionnal activation #7

Open mickours opened 10 years ago

mickours commented 10 years ago

Allows users to add additional sections to take advantage of the hooks and provide an activation mechanism using CLI. For example:

# in recipe
setup:
...
my_section:
...
export:

# in steps
my_step:
  - on_my_section_init:
   ...

# using CLI to run only setup and my_section
kameleon build my_recipe --section [setup, my_section]
npf commented 9 years ago

+1

mickours commented 8 years ago

An other way to do this is the use of YAML tags like in this project: http://vagga.readthedocs.org/en/latest/config_overview.html#commands

We can use these tags to select a subpart of the recipe. For example I tag some steps with !my_steps and than use an option to execute only my tag or the other way around to exclude some tags like:

kameleon my_recipe.yaml --only-tagged  my_steps
#or
kameleon my_recipe.yaml --exclude-tagged my_steps

What do you think?

npf commented 8 years ago

Looks nice.