Skip to content

YAML configuration requires specific order of entries #3704

@boesing

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions