โšก ~/naveed Interview Prep
โšก Portfolio Home โœ๏ธ Engineering Blog Deep Dives ๐ŸŽฏ Interview Hub 998+ Scenarios โ˜ธ๏ธ Kubernetes Mastery Hub 24 Modules ๐ŸŽฎ DevOps Arcade & Quizzes Subnet Blitz โšก ๐Ÿ—บ๏ธ DevOps Roadmaps PDFs & Guides ๐Ÿค– Morpheus Analysis AI Quant โ†— ๐Ÿ› ๏ธ Developer Tools Utilities ๐Ÿงช Labs & Experiments ๐Ÿ“„ Interactive CV & Certs ๐Ÿ”— All Links & Socials โšก Join The Dispatch (Weekly SRE Newsletter) →
Senior DevOps / SRE [L2] CI/CD ๐Ÿ” Supply Chain Security & Advanced CI/CD Production Scenario [L2]

Q: Your GitHub Actions workflow is taking 18 minutes because it uploads a 4GB test artifact to GitHub Artifacts storage after every run, even for PRs that fail. How do you reduce pipeline cost and duration with minimal code changes?

Two immediate improvements:

#CI/CD #๐Ÿ” Supply Chain Security & Advanced CI/CD #L2 #DevOps #Automation #Pipelines
๐ŸŽ™๏ธ Candidate Opening & Architectural Context
""In our delivery pipeline supporting multiple engineering squads, pipeline reliability was paramount. The interviewer is testing: Conditional artifact uploads, artifact retention policies.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

๐Ÿ› ๏ธ Production Runbook & Step-by-Step Resolution

1๏ธโƒฃ

Initial Diagnostics & Root Cause Analysis

Two immediate improvements:

  • Conditional upload: Only upload artifacts when the job actually passes or when specifically triggered on main:
  • Reduce artifact size: Archive only the failed test reports, not the entire output directory. For a 4 GB binary artifact, push it to S3 directly from the workflow instead of GitHub Artifacts storage โ€” it's 10ร— cheaper and not subject to GitHub's storage quotas.
  • Set retention-days: 7 on all artifacts to prevent indefinite storage accumulation.
2๏ธโƒฃ

Remediation & Permanent Safeguards

- uses: actions/upload-artifact@v4
  if: success() && github.ref == 'refs/heads/main'
  with:
    name: test-results
    path: ./results/
    retention-days: 7
๐Ÿ’ก The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Conditional upload: Only upload artifacts when the job actually passes or when specifically triggered on main:."
โšก 60-Second Elevator Pitch Talking Points
  • Conditional upload: Only upload artifacts when the job actually passes or when specifically trigg...
  • Reduce artifact size: Archive only the failed test reports, not the entire output directory. For ...
  • Set retention-days: 7 on all artifacts to prevent indefinite storage accumulation.
Advertisement
Want more CI/CD scenarios?
Explore our complete collection of scenario-based CI/CD interview runbooks.
Browse All CI/CD Questions →

๐Ÿ“š Related Production Scenarios in CI/CD