Skip to content
Latchkey

Buildkite "artifact upload ... no files matched" in CI

The buildkite-agent artifact upload command uploads files matching a glob. If nothing matches the pattern, it reports "no files matched" because the files were never produced, or the path is wrong.

What this error means

The upload step logs "no files matched" and later artifact download steps find nothing to fetch.

buildkite-agent
$ buildkite-agent artifact upload "coverage/**/*"
2026-06-30 12:00:01 WARN  No files matched glob "coverage/**/*"

Common causes

The files were not produced or are elsewhere

The build step that should have created the artifacts failed or wrote them to a different directory than the glob targets.

A wrong working directory or over-tight glob

The upload runs from a directory where the pattern does not match, or the glob is too specific (wrong extension or missing **).

How to fix it

Confirm the files exist, then match them

  1. List the output directory in the same step to confirm the files exist.
  2. Adjust the glob to the real path and use ** for nested directories.
  3. Re-run and confirm the upload reports the matched files.
Terminal
ls -R coverage || true
buildkite-agent artifact upload "coverage/**/*"

Upload from the correct directory

Run the upload where the artifacts were written, or pass an absolute path so the working directory does not matter.

Terminal
buildkite-agent artifact upload "$PWD/dist/*.tar.gz"

How to prevent it

  • List the output directory before uploading to verify artifacts exist.
  • Use ** in globs for nested output trees.
  • Fail the producing step loudly so a missing artifact is caught upstream.

Frequently asked questions

What causes ""no files matched""?
The build step that should have created the artifacts failed or wrote them to a different directory than the glob targets.
How do I fix "no files matched"?
Confirm the files exist, then match them

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card