AWS Builder Center
From Code to Production: Building a Simple DevOps Pipeline with Git, Jenkins, Docker & AWS

From Code to Production: Building a Simple DevOps Pipeline with Git, Jenkins, Docker & AWS

Learn how to build a simple end-to-end DevOps pipeline using GitHub, Jenkins, Docker, and AWS. This practical guide explains CI/CD, containerization, automated testing, and cloud deployment step by step.

DEVOPS/CLOUD ENGINEER

From Code to Production: Building a Simple DevOps Pipeline with Git, Jenkins, Docker & AWS

In modern software development, writing code is only one part of the process. The real challenge is getting that code reliably from a developer's laptop into a production environment.
This is where DevOps comes in.
DevOps combines development and operations practices to automate software delivery, improve collaboration, and make deployments faster and more reliable.
In this article, we will understand a simple DevOps workflow using Git, Jenkins, Docker, and AWS.

🔄 The DevOps Workflow

A basic workflow looks like this:
Developer → GitHub → Jenkins → Docker → AWS → Application
Each tool has a specific role:
  • Git/GitHub – Stores and manages source code.
  • Jenkins – Automates the CI/CD pipeline.
  • Docker – Packages the application and its dependencies into containers.
  • AWS – Provides cloud infrastructure to run the application.

1. Push Code to GitHub

The developer first creates the application and pushes the code to a GitHub repository.
For example:
git add .
git commit -m "Add application"
git push origin main

Git allows us to track changes, while GitHub provides a remote repository where the team can collaborate.

2. Jenkins Starts the Pipeline

Jenkins can monitor the GitHub repository and automatically start a pipeline whenever new code is pushed.
A typical pipeline contains stages such as:
Checkout
↓
Build
↓
Test
↓
Docker Build
↓
Docker Push
↓
Deploy

This removes many manual steps from the software delivery process.

3. Build and Test

Jenkins checks out the latest source code and builds the application.
Testing is an important part of CI because it helps detect problems before the application reaches production.
For example:
./run-tests.sh

If the tests fail, Jenkins can stop the pipeline instead of deploying broken code.

4. Build a Docker Image

After successful testing, Jenkins can create a Docker image.
Example:
docker build -t myapp:latest .

The Docker image contains the application and the environment required to run it.
This provides consistency between development, testing, and production environments.

5. Push the Image to a Registry

The image can then be pushed to a container registry such as Amazon ECR.
For example:
docker tag myapp:latest <account-id>.dkr.ecr.<region>.amazonaws.com/myapp:latest

docker push <account-id>.dkr.ecr.<region>.amazonaws.com/myapp:latest

Now the image is available for deployment.

6. Deploy to AWS

The final stage is deploying the application to AWS.
Depending on the project requirements, containers can be deployed using services such as:
  • Amazon ECS
  • Amazon EKS
  • AWS App Runner
  • Amazon EC2
For a beginner DevOps project, starting with EC2 or ECS can help build a strong understanding of the deployment process.

🏗️ Example Architecture

Developer
|
↓
GitHub
|
↓
Jenkins
|
┌────────┴────────┐
↓ ↓
Build Test
│ │
└────────┬────────┘
↓
Docker Image
|
↓
Amazon ECR
|
↓
AWS
|
↓
Application


🔐 Why Automation Matters

Imagine deploying an application manually every time a developer makes a change.
You would need to:
  1. Download the latest code.
  1. Build the application.
  1. Run tests.
  1. Build the container.
  1. Push the image.
  1. Connect to the server.
  1. Deploy the application.
  1. Verify that everything works.
A CI/CD pipeline can automate most of these steps.
This gives teams:
  • Faster deployments
  • Fewer manual errors
  • Consistent deployments
  • Faster feedback
  • Easier rollback
  • Better collaboration

🚀 What Comes Next?

Once you understand this basic pipeline, you can extend it with more DevOps tools and practices.
For example:
Terraform can automate AWS infrastructure.
Ansible can automate server configuration.
Kubernetes can manage containers at scale.
Prometheus and Grafana can provide monitoring and observability.
The workflow can eventually become:
GitHub
↓
Jenkins
↓
Terraform
↓
AWS Infrastructure
↓
Docker
↓
Kubernetes
↓
Monitoring


💡 Final Thoughts

DevOps is not about learning as many tools as possible. It is about understanding how those tools work together to create a reliable software delivery process.
Start with a simple pipeline:
Git → Jenkins → Docker → AWS
Then gradually introduce infrastructure as code, configuration management, Kubernetes, monitoring, and security.
The best way to learn DevOps is to build projects, break them, troubleshoot the problems, and improve the pipeline step by step.
Keep building. Keep automating. Keep learning. 🚀
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article