buildkite / buildkite/docs

Glob pattern dist/**/* doesn't discover top level (within dist/) files

Open
#2,394 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
59
Forks
313
PR merge metrics
No merged PRs in 30d

Description

When using `buildkite-agent artifact download "dist/**/*" .` to download all artifacts in a compiled `dist` folder that has successfully been uploaded using `artifact_paths: "dist/**/*"` in the `pipeline.yml` file, the files downloaded do not contain files such as `dist/express.js` or `dist/worker.js`.

This seems [unexpected for the given glob pattern](https://www.digitalocean.com/community/tools/glob?comments=true&glob=dist%2F%2A%2A%2F%2A&matches=false&tests=%2F%2F%20This%20will%20match%20as%20it%20ends%20with%20%27.js%27&tests=dist%2Ffolder%2Ffile.js&tests=%2F%2F%20This%20won%27t%20match%21&tests=dist%2Ffile.js).

**NOTE**: The above pattern does download all files that are contained in subdirectories, for example, dist/apps/express.js and dist/apps/worker.js are successfully downloaded with the above command.

I have found a workaround by using `buildkite-agent artifact download "dist/**" .`, however, unsure if this was intended behaviour or not.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the artifact upload from pipeline.yml with artifact_paths: "dist/**/*", then run buildkite-agent artifact download "dist/**/*" . against files at the top level and in subdirectories. Compare the result with the "dist/**" workaround and determine whether the documented glob behavior or the agent behavior should change; done means the intended behavior and workaround are clearly documented or the bug is fixed.

Written by the indexing model from the issue text.

Assessment

Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.