Skip to content

ExtraAction

The extra action includes extra files for the installation. Files are registered in <profile>.extra and copied to the extra directory.

Usage

Click on the to learn more about the action's options.

Extra Action
actions:
  - action: extra
    description: Extra files #(1)!
    files: # (2)! 
      - path/to/file
      - path/to/another-file
  1. [Optional] Description, for documentation purposes
  2. [Required] List of file paths

Implementation

ExtraAction

Bases: Action

Extra action

Source code in simple_cdd_yaml/actions.py
class ExtraAction(Action):
    """ Extra action """
    def perform_action(self, props):
        description = props.get('description', 'Extra files')
        self._write_action(f'# {description}\n', extension='extra')
        extra_files = []
        for file in props['files']:
            src = pl.Path(file)
            dst = self.output_dir / 'extra' / src.name
            shutil.copyfile(src, dst)
            extra_files.append('extra/' + src.name)
        self._print(' '.join(extra_files), header='Extra files:')
        return '\n'.join(extra_files) + '\n'

    def perform_debos_action(self, props):
        return None