Skip to content

group step: key attribute silently dropped during YAML serialisation #170

@JonCubed

Description

@JonCubed

Problem

It is not possible to target a group step as a dependency target via depends_on. While both the Buildkite group step spec and the plugin README document key as a supported attribute, the key field is silently dropped from group steps during YAML serialisation.

Example config:

watch:
  - path: services/
    config:
      group: CI/CD Infrastructure
      key: group:cicd
      steps:
        - label: Deploy
          command: echo deploy

Generated output (incorrect):

steps:
  - group: CI/CD Infrastructure
    steps:
      - label: Deploy
        command: echo deploy

key: group:cicd is missing from the group.

Root cause

The Group struct used during YAML marshalling only carried Label and Steps. When MarshalYAML converted a Step with Group != "" into a Group, any Key on the step was discarded.

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