Skip to content

YAML configuration requires specific order of entries #3704

Description

@boesing
  • Deployer version: 9.1.0
  • Deployment OS: Debian 12

It seems that deployer reads configuration as it comes in.
I personally would expect the order to be:

  1. config
  2. import
  3. tasks
  4. after/before

The main reason for this is that:

  • one might provide required config variables for recipes before actually importing the recipe.
  • tasks might want to invoke tasks from imported recipes
  • after/ before wants to queue tasks after or before tasks from imported recipes

Problematic YAML order:

tasks:
  "deploy:prepare:whatever":
    - info: "Whatever"
after:
  "deploy:prepare": "deploy:prepare:whatever"
import:
  - 'recipe/common.php'

Working YAML order:

import:
  - 'recipe/common.php'
tasks:
  "deploy:prepare:whatever":
    - info: "Whatever"
after:
  "deploy:prepare": "deploy:prepare:whatever"

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions