I put in a PR here that already supports this with my rationale: Directory artifact paths by jsoo1 · Pull Request #1571 · buildkite/agent · GitHub
(Sorry I did not think to put in a feature request here first)
To summarize my thoughts from the github issue and PR, there are two big user experience reasons the
artifact_paths field should accept directories as well as glob patterns.
- Principle of least surprise. If
artifact_paths contains some directory, it is very surprising when the contents of the directory are not uploaded, nor tried.
$BUILDKITE_ARTIFACT_PATHS in scripts with only glob paths makes some uses impossible. In particular, it is because you can’t unambiguously un-glob a string in bash. For instance,
make prefix=$BUILDKITE_ARTIFACT_PATHS will simply never work unless directories can be in
Hey @john.soo thanks for syncing these up. We take feature requests from all sorts of places!
I’ll ping the team to make sure they’ve seen that PR and can continue it from there
Just a quick bump. I haven’t heard anything new about this PR in some time. Is the team willing to look at it? I’d rather know sooner than later if it is not desired.
I am following up on this with the team and will get back to you shortly on this with an update. Thank you
If you do this, it might be nice to have an auto-archive feature. E.g turn a some-dir into some-dir.zip
I could see that being a nice option. But I think it could violate the principle of least surprise which is the reason I opened the issue in the first place. When I specified a directory in
artifacts_paths, and the agent told me it was ignoring the directory, I was surprised. I think I might be similarly surprised if my directory were magically turned into a tarball, too.
Hi there! Just wanted to follow up and see what the team thought about this. Thank you!
Hello, @john.soo! Thank you for reaching out! This issue is currently in the process of triage by the team. When some new information is available, someone from the support team will report here.