Skip to content

Improve support for YML arrays in New-ADOPipeline #125

Description

@stefanes

When using YML arrays in a PowerShell step you need to convert it into a array by doing, as far as I know, something like this:

$requiredModules = "${{ join(';',parameters.requiredModules) }}" -split ';' | Where-Object { $_ }
  1. Join the array into a string with the pipeline join function
  2. Split the now string into a PowerShell array
  3. Use ... | Where-Object { $_ } to get rid of any null values (added if passing in [])

Currently the output generated looks something like this:

$parameters.requiredModules -split ';' -replace '^[''"]' -replace  '[''"]$'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions