Octopus "octo pack: no files were found" in CI
octo pack could not find any files to include. The --basePath points at the wrong directory, the --include glob matches nothing, or the build artifacts were never produced before the pack step ran.
What this error means
octo pack fails or warns with "no files were found" and produces an empty or missing package, which then breaks the downstream push.
octo pack --id Web --version 1.0.0 --basePath ./publish
Warning: no files were found in './publish' matching the include pattern.Common causes
The base path is wrong or the build ran elsewhere
The --basePath directory does not contain the build output, often because the publish step wrote to a different folder or ran in another job.
The include glob matches no files
A too-specific --include pattern (wrong extension or subfolder) excludes everything, leaving nothing to pack.
How to fix it
Point pack at the real build output
- List the directory that holds the compiled output before packing.
- Set --basePath to that directory.
- Widen or correct --include so it matches the produced files.
dotnet publish -o ./publish
octo pack --id Web --version 1.0.0 --format zip --basePath ./publishEnsure the build step runs before pack
If the artifact comes from an earlier job, download it into the pack job first so the files exist when octo pack runs.
How to prevent it
- Build or download artifacts into a known directory before packing.
- Keep --basePath and --include aligned with the publish output.
- List the directory in the log right before pack to catch empty output early.