Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ignored 'references' top-level key to allow for yaml placeholder usage #101

Open
PeterJCLaw opened this issue Sep 30, 2020 · 0 comments

Comments

@PeterJCLaw
Copy link
Contributor

Routemaster configs can get quite verbose and repetitive. It would be great to be able to convert something like this:

states:
- gate: first
  triggers:
    - time: 17h30m
      timezone: metadata.timezone
    - event: entry # for debug
  exit_condition: 12h has passed since history.entered_state or metadata.debug
  next: second

- gate: second
  triggers:
    - time: 17h30m
      timezone: metadata.timezone
    - event: entry # for debug
  exit_condition: 12h has passed since history.entered_state or metadata.debug
  next: third

into this

references:
  wait-one-day: &wait-one-day
    triggers:
      - time: 17h30m
        timezone: metadata.timezone
      - event: entry # for debug
    exit_condition: 12h has passed since history.entered_state or metadata.debug

states:
- gate: first
  <<: *wait-one-day
  next: second

- gate: second
  <<: *wait-one-day
  next: third

However I believe at the moment the config schema validation would reject this.

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

No branches or pull requests

1 participant