CI/CD & GitOps Platform
Building production-grade CI/CD infrastructure from scratch—evolving a greenfield microservices platform to 400 deploys/month with enterprise security
The Challenge
I joined as a Graduate QA Engineer at the very beginning of a massive architectural transformation: migrating from a legacy monolith to a modern Kubernetes-based microservices platform.
With no existing CI/CD infrastructure and a blank canvas, I was tasked with designing and implementing the entire deployment pipeline that would serve 20+ microservices across 4 environments (Dev, QA, Pre-Prod, Production).
Initial Requirements
- •Zero existing infrastructure — build everything from scratch
- •Multi-environment strategy — Dev, QA, Pre-Prod, Prod with different promotion rules
- •Security-first approach — SAST/SCA scanning, compliance gates
- •GitOps-native — declarative deployments with ArgoCD
Key Insight: Zero existing infrastructure—build everything from scratch for a massive monolith to microservices migration.
The Evolution
Over 2 years of iterative platform engineering, I transformed a basic build script into a sophisticated, production-ready CI/CD platform. Here's how it evolved:
Phase 1:Foundation (Months 1-6)
Built the initial pipeline architecture with basic Maven builds, Docker image creation, and manual ECR pushes.
image: maven:3.9.6
pipelines:
branches:
master:
- step:
name: Build, Test, and Push Docker Image
script:
- mvn clean install
- mvn test
- docker build -t $IMAGE_NAME:$IMAGE_TAG .
- pipe: atlassian/aws-ecr-push-image:2.2.0
- step:
name: Deploy to Dev
script:
- git clone git@bitbucket.org:company/argocd-apps.git
- ./scripts/update_tag.sh
- git push origin masterKey Achievement: Established GitOps pattern with ArgoCD for declarative deployments
Phase 2:Standardisation & Reusability (Months 6-12)
Created reusable pipeline components and custom base images to eliminate duplication across services.
- •Custom Base Image — Pre-built Maven image with kubectl, ArgoCD CLI, AWS CLI, jq
- •Shared Pipeline Scripts — Centralised notifications via pipeline_reporter.sh
- •Kustomize Overlays — Environment-specific configuration management
- •App-of-Apps Pattern — Hierarchical ArgoCD application management
Key Achievement: Custom Docker base image reducing pipeline config by ~40%
Phase 3:Security & Quality Gates (Months 12-18)
Integrated enterprise security scanning and quality gates directly into the pipeline.
SAST (Veracode)
Static code analysis blocking critical/high vulnerabilities
SCA (SourceClear)
Dependency vulnerability scanning with automated reporting
Key Achievement: 100% security scan coverage on all PRs
Phase 4:Test Orchestration & Observability (Months 18-24)
Migrated from brittle pipeline-based testing to robust ArgoCD PostSync hooks with comprehensive observability.
- •PostSync Hook Architecture — Tests run AFTER deployment completes
- •Automated Test Suites — JUnit (API), Cucumber + Playwright (UI) as Kubernetes Jobs
- •DORA Metrics — Custom collector tracking deployment frequency, lead time, MTTR
Why PostSync > Pipeline Testing
Pipeline tests run before pods are healthy, causing false negatives when services aren't ready. PostSync hooks wait for ArgoCD sync completion, then validate pods are ready before running tests — eliminating an entire class of flaky failures.
Key Achievement: Reduced false test results by ~90%
Architecture
CI/CD & GitOps Architecture
Flow: Developer commits → Bitbucket runs parallel tests → Docker builds with custom base image → Pushes to ECR → Updates GitOps repo → ArgoCD syncs → Deploys to K8s → PostSync tests run → Teams notifications at each stage
Current State: Production-Grade Platform
Pipeline Architecture
Business Impact
Deployments per month across all environments
Consistent build time with parallel testing
Microservices using standardised pipeline
Alert rules for rapid incident response
Reduction in false test results
Security scan coverage on all PRs
Transformation Metrics
Drag the slider to see the dramatic transformation from manual processes to automated platform engineering.
Lessons Learned
- →Iterative improvement beats big-bang rewrites: Each phase built on the previous, allowing production usage throughout
- →Standardisation is key to scale: Reusable components (base images, scripts) made onboarding new services trivial
- →GitOps eliminates deployment drift: Declarative configs in Git provided audit trail and rollback capability
- →Testing architecture matters: Moving from pipeline polling to PostSync hooks eliminated an entire class of flaky tests
- →Observability from day one: DORA metrics, deployment notifications, and test reporting enabled data-driven improvements
Want Similar Results?
I'd love to bring this same approach to your platform engineering challenges. Let's discuss how I can help your team.