Skip to content

Unable to insert parameter values as object keys with roadiehq:utils:merge #1809

@jackmtpt

Description

@jackmtpt

Expected Behavior

Scaffolder step:

- id: injectPipeline
  name: Merge pipeline definition
  action: roadiehq:utils:merge
  input:
    path: ./my.file.yml
    preserveYamlComments: true
    content: {
      "pipelines": {
        "${{ parameters.serviceFullName }}": {
          "yml_path": "./pipelines/${{ parameters.serviceShortName }}.yml"
        }
      }
    }

Suppose that:

  • serviceFullName = My.Service
  • serviceShortName = my-service

Existing file contents:

pipelines:
  ExamplePipe1:
    yml_path: pipeline.yml

I expect the final file to be:

pipelines:
  ExamplePipe1:
    yml_path: pipeline.yml
  My.Service:
    yml_path: ./pipelines/my-service.yml

Current Behavior

Instead I get this:

pipelines:
  ExamplePipe1:
    yml_path: pipeline.yml
  ${{ parameters.serviceFullName }}:
    yml_path: ./pipelines/my-service.yml

The serviceFullName parameter reference is left as the literal ${{ }} string - it's not substituted at all.

  • "@roadiehq/scaffolder-backend-module-utils": "^3.0.0"
  • Backstage 1.33.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions