Skip to content

fix: accept newline-separated manifest path lists - #795

Merged
Suneha Bose (bosesuneha) merged 3 commits into
Azure:mainfrom
evannaderi:fix/manifest-path-list
Oct 15, 2026
Merged

Suneha Bose (bosesuneha) merged 3 commits into
Azure:mainfrom
evannaderi:fix/manifest-path-list

Conversation

@evannaderi

Copy link
Copy Markdown
Contributor

Description

MANIFESTPATH (Azure Pipelines) and DEPLOYMENTMANIFESTPATH (GitHub Actions) are passed to the manifests input of KubernetesManifest@1 and Azure/k8s-deploy, which accept multiple paths separated by newlines. The dirPath kind rejects newlines, so these templates can't be generated for more than one manifest path. This adds a dirPathList kind that validates each line with dirPathValidator and uses it for both variables. Both templates already render these values with jsonString, so the newlines stay inside a single YAML value.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Refactor

How Has This Been Tested?

  • Unit Test: go test ./.... Adds validator cases, a render test for both templates with multiple paths, and a test that every dirPathList variable is rendered with jsonString.
  • E2E Test:
  • Other Test:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

MANIFESTPATH (Azure Pipelines) and DEPLOYMENTMANIFESTPATH (GitHub Actions) feed the manifests input of KubernetesManifest@1 and Azure/k8s-deploy, which take multiple paths separated by newlines. The dirPath kind rejects newlines, so callers can no longer generate pipelines that deploy more than one manifest path.

Add a dirPathList kind that validates each newline-separated entry with dirPathValidator, and use it for both variables. Both templates already render these values with jsonString, so newlines stay inside a single YAML scalar. A template test asserts every dirPathList variable is rendered through jsonString.
@evannaderi

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

Comment thread pkg/config/validators/validators.go
Comment thread template/azurePipelines/manifests/draft.yaml
Comment thread template/workflows/manifests/draft.yaml

@bosesuneha Suneha Bose (bosesuneha) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bosesuneha
Suneha Bose (bosesuneha) merged commit 68399b0 into Azure:main Oct 15, 2026
148 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants