-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload assets using multiple minimatch patterns #34
Comments
Looking at the VSTest@2 task source, they use a multiline input type with corresponding code at https://github.com/Microsoft/azure-pipelines-tasks/blob/c35d1e72b74fa72316e3fa35d71a4fad05ce43f2/Tasks/VsTestV2/distributedtest.ts#L101-L115 that seems to support a wider grammar for minimatch patterns than globbing, which is its own benefit but also introduces consistency with built-in tasks. I don't imagine this would be a breaking change unless globbing and lstat have some slight nuances, but maybe a new major version of the task would be in order? Willing to contribute if you're interested. |
Hey @heaths, first of all thank you for the feedback. I've never used multi-line folders 😞, code implementation from this repository use I used another implementation in my github-tools-vsts/Src/GithubReleasePublish/githubReleasePublish.js Lines 57 to 62 in ba6266f
Code implementation used in I would be very grateful if you could contribute, since I use |
I hope to get to this later today. Any problem with just using the same pattern as other built-in tasks? Consistency improves productivity and reduces errors. Since you document that the tasks supports minimatch patterns, I imagine - as I did - devs would assume it's the same pattern they can use with built-in tasks. |
PS: I mistakenly pointed out the wrong reference source earlier. Digging in deeper, I see that built-in tasks use https://github.com/Microsoft/azure-pipelines-task-lib/blob/master/node/task.ts#L1412, which does rely on the minimatch library (as does glob) buts adds a bit more processing. |
Resolves marceloavf#34. Upgraded vsts-task-lib to newer azure-pipelines-task-lib and bumped the major version of the task since this is a significant new feature to the API surface. Signed-off-by: Heath Stewart <[email protected]>
No problem @heaths, thank you so much for the PR. I'll release it into our development channel stage to check it out and then make it to production ok. |
BREAKING CHANGE: The assets upload input has been changed to multiLine type. Resolves #34. Upgraded vsts-task-lib to newer azure-pipelines-task-lib and bumped the major version of the task since this is a significant new feature to the API surface.
Upgraded GitHubReleasePublish task to version 1 after fixing marceloavf/github-tools-vsts#34
Upgraded GitHubReleasePublish task to version 1 after fixing marceloavf/github-tools-vsts#34
Bug Report
Describe the bug
When using multiple minimatch patterns like most other tasks, no assets are uploaded. E.g.
To Reproduce
Define a YAML build def with task like the one above, such that minimatch patterns should discover multiple artifacts.
Repo: https://github.com/heaths/caffeine
Build: https://dev.azure.com/heaths/public/_build/results?buildId=100&view=logs
Expected behavior
All files matching all minimatch patterns should be used. Ideally, the input control for the task is higher as well, or the documentation for the field at least clarifies that only one line works, but that is certainly not ideal since you'd need multiple tasks to upload multiple artifacts with different patterns.
Enviroment
The text was updated successfully, but these errors were encountered: