Project Title: Optimizing CI/CD Pipeline Reliability in Azure DevOps
Technologies Used:
- Azure DevOps
- Node.js
- npm
- YAML Pipelines
- Vue.js
Summary/Challenge:
A core Continuous Integration (CI) build step in our Azure DevOps pipeline, responsible for installing Node.js dependencies (npm install), was failing intermittently. This created non-deterministic builds and required manual pipeline re-runs, wasting developer time.
Solution & Implementation:
The fix involved two key changes to the Azure DevOps YAML pipeline:
- Switched to
npm ci(Clean Install): Migrated the installation command from the non-deterministicnpm installto the faster and more reliablenpm ci. - Added Explicit Directory Cleanup: Inserted a
DeleteFiles@1task immediately before the installation step to explicitly clean up the working directory and remove any potentially corruptnode_modulesfolder.
Key Achievements & Impact:
- Achieved 100% build reliability for the dependency installation step.
- Eliminated manual pipeline re-runs, saving developer time.
- Implemented a faster and more deterministic build process.