Actions are the execution units needed to move the project state to a given step through the parts lifecycle. The action behavior is determined by its action type.

class craft_parts.actions.ActionType(value)[source]

The type of action to be executed.

Action execution can be modified according to its type:

RUN: execute the expected commands for step processing.

RERUN: clear the existing data and state before proceeding.

UPDATE: try to continue processing the step.

SKIP: don’t execute this action.

REAPPLY: run the step commands without updating its state.

RUN = 0
SKIP = 2
class craft_parts.actions.Action(part_name, step, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))[source]

The action to be executed for a given part.

Actions correspond to the operations required to run the lifecycle for each of the parts in the project specification.

  • part_name (str) – The name of the part this action will be performed on.

  • step (Step) – The Step this action will execute.

  • action_type (ActionType) – Action to run for this step.

  • reason (Optional[str]) – A textual description of why this action should be executed.

  • project_vars (Optional[Dict[str, ProjectVar]]) – The values of project variables from a previous execution, used if the action type is ActionType.SKIP.

  • properties (ActionProperties) –