Project | CI/CD
Jenkins + Kubernetes Test Pipeline
A declarative Jenkinsfile with parallel stages, parameters, a quality gate and masked credentials; a namespace per build, readiness probes, a smoke Job inside the cluster and API tests through port-forward, all in scripts that CI shares.
Jenkins configured entirely as code builds a service, deploys it to a kind Kubernetes cluster and runs 21 tests against it in about 30 seconds; GitHub Actions starts a real Jenkins on every push and requires the pipeline to pass.
Evidence checked 16 Oct 2026 | CI workflow and README evidence
On this page
Problem and purpose
Shows the CI/CD side of test automation: getting tests to run reliably against a freshly deployed system, on every change, with results people can read. The service under test lives in the repository, so the pipeline depends on nothing outside it, and the Jenkinsfile itself is tested in CI like any other code.
Architecture
Jenkinsfile stages, parallelism, parameters, quality gate, reports
│ calls
scripts/*.sh kind-up, deploy, smoke-job, api-tests, teardown (also used by GitHub Actions)
│
kind cluster 'qa' namespace qa-<build>: Deployment (2 pods, probes) + Service + smoke Job
▲
Jenkins controller (Docker) JCasC + Job DSL, uses the host's Docker for images and the clusterTechnology and tools
| Area | Tools |
|---|---|
| CI server | Jenkins 2.580 LTS in Docker: Configuration as Code, Job DSL, Pipeline Graph View, JUnit, HTML Publisher, credentials binding |
| Kubernetes | kind 0.33 (Kubernetes in Docker), kubectl 1.37: Deployment with probes, Service, Job, a namespace per build |
| System under test | room-booking: Node.js 24 API, no dependencies, with node:test unit tests |
| Tests | pytest 9 + requests: smoke and regression suites, JUnit XML and pytest-html reports, Ruff |
| CI | GitHub Actions: checks, the Kubernetes path with the same scripts, and a real Jenkins that runs the Jenkinsfile |
Engineering decisions and approach
- Everything as code: plugins in the image, users, credentials and the job in JCasC and Job DSL, the pipeline in the Jenkinsfile
- Scripts do the work and the Jenkinsfile orchestrates, so GitHub Actions runs the same deployment and tests without Jenkins
- A namespace per build on a reused cluster: isolated runs, one-command cleanup, about 30 seconds per build
- Two deployment checks: a Kubernetes Job inside the cluster through the Service name, and API tests from outside through port-forward
- The deployment reports its build number, and a smoke test asserts it, so a stale pod or wrong image cannot pass
- The quality gate also fails when too few tests ran; each stage records its results once (an early version counted every test twice)
Test scope and execution approach
Project-specific checks and execution details documented in the repository:
- Parallel unit tests and lint, then image build, kind cluster and image load, deploy with rollout wait, in-cluster smoke Job, parallel API smoke and regression
- Parameters for the test scope and keeping the deployment; timeouts, timestamps, no concurrent builds, log rotation
- JUnit results with trend, published HTML reports, archived artifacts, a masked credential in the notification step
- A deliberately broken rule failed the build at the first stage, before anything was built or deployed
- CI starts the Jenkins image, triggers the job through the REST API and fails unless the Jenkins build ends with SUCCESS
- Design notes and 76 interview questions on Jenkins, pipelines, Docker and Kubernetes, linked to the code (Markdown + PDF)
Results with dated evidence
Historical repository or workflow evidence · older evidence; recheck the linked source
CI workflow and README evidence
Jenkins configured entirely as code builds a service, deploys it to a kind Kubernetes cluster and runs 21 tests against it in about 30 seconds; GitHub Actions starts a real Jenkins on every push and requires the pipeline to pass.
Evidence checked: | Open dated evidence
Evidence explorer
Static screenshots are labelled as images; dated workflow links identify the execution evidence and its check date.
Static material from the public repository. The linked verification record was checked 2026-10-16; that date is not a screenshot capture date.
Dated workflow record
Evidence checked 2026-10-16. Open CI workflow and README evidence
Local setup and execution
docker compose -f jenkins/docker-compose.yml up -d --build --wait # Jenkins on http://localhost:8088
scripts/run-jenkins-build.sh # start the job, wait, print the resultWorkflow and reports
Known limitations
- Builds run on the controller and it uses the host's Docker socket: fine for a local demo, not for a shared Jenkins
- Images are loaded into kind instead of pushed to a registry; plugins are not pinned yet
- The evidence is limited to the public repository and linked run; it does not establish customer production impact.