Skip to content

Separate definition of task dependencies #523

Description

@fkorotkov

Right now for very large .cirrus.yml configurations there is a problem of dependency definition. All the depends_on are sparsed across all the task definition and it might be hard to wrap your head around it. What if we'll introduce a new way to define the execution graph via a top-level dependecies definition?

Here is a configuration example of a continious deployment:

# .cirrus.yml

dependencies:
  Deploy:
    only_if: $CIRRUS_BRANCH == "main"
    requires:
      - Check Incidents
      - Push

task:
  name: Push

task:
  name: Check Incidents
  script: ... # checks that there is no active incident

task:
  name: Deploy

In case dependencies is used, parser will error if depends_on or only_if are used on tasks so there is strictly two different options to specify dependencies without combining them. This way with the new dependencies we can change behaviour slightly. For example, treat requires as a strict depends_on.

Creating this ticket as a brain dump and a conversation starter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions