Interview Prep/CI/CD/Jenkins Build and Agent Failures

A Windows agent build fails with `The filename or extension is too long` / path over 260 chars.

AdvancedTroubleshootingJenkins Build and Agent Failures
Answer

Likely causes → Deep node_modules or long job names produce paths over MAX_PATH.

Diagnose → Check the workspace path length in the log.

Fix → Shorten the workspace root (ws('C:\\w\\x')), enable long paths (LongPathsEnabled, git config core.longpaths true).

Prevent → Use short job names or Linux agents.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Jenkins Build and Agent Failures