Website Development with Jenkins Job on AWS-EC2
Last Updated :
23 Jul, 2025
Pre-requisites: AWS, Jenkins, Git&Github
Jenkins is a popular open-source automation server that helps to automate different stages of software development, including building, testing, and deploying applications. It is a powerful tool that is widely used in DevOps environments to automate the process of continuous integration and continuous delivery (CI/CD).
Steps to deploy website by using Jenkins on AWS-EC2
Step 1: Click on the EC2 service.

Step 2: Click on the Launch Instance.

Step 3: Select AMI.

Step 4: Select instance type and Key pair name.

Step 5: Create the Security Group.
- Select - Create a new security group
- Security group name = sg-Jenkins
- Allow HTTPS - 443, HTTP - 80, or Custom TCP Rule - 8080 for incoming or outgoing traffic from the internet

Step 6: Click on Launch Instance.

Step 7: Create the GitHub Repository.
- We will upload our Website code here
- Copy the Repository URL
Step 8: Know to upload the following code to GitHub. Write your code for your Website.
-768.png)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport" content="width=
device-width, initial-scale=1.0">
<style>
body{
background-color: lightgreen;
}
h1{
text-align: center;
}
h2{
text-align: center;
}
p{
text-align: center;
font-size: 20px;
}
</style>
<title>geeksforgeeks</title>
</head>
<body>
<h1>GeeksForGeek</h1>
<br>
<h2> Website Development </h2>
<br>
<p> Website Development with Jenkins Job on AWS - EC2</p>
</body>
</html>
- Upload the code in Github Repository via a Drag & Drop or using Git.
- We already created the GitHub Repository.
-768.png)
Step 9: After successfully setup the GitHub repo Now open Jenkins.

Step 10: Type the Item Name.
- name - website development
- choose - freestyle project

Step 11: Click on the job configure.
- Description - Website Development with Jenkins freestyle job

Step 12: Source code - Git # Paste the GitHub repository URL.

Step 13: Select the required branch to get the source code.

Step 14: Select Build triggers - (POLL SCM * * * * *).

Step 15: Build step - Execute Shell.

sudo apt install -y git
sudo apt install -y apache2
sudo systemctl start apache2
sudo systemctl enable apache2
sudo rm -rf /var/www/html
sudo rm -rf /var/www
sudo git clone <github repository> /var/www/html
Step 16: Copy and paste the above commands into the command box and click on save

Step 17: Click on Build and now you can see the job is in the build process. After that Jenkins will be connected with the server or Github repository
Step 18: Now open Browser and type the IP-Address with the 8080 Port number URL: http://<aws_ip_adress:8080>. You can see that website is accessible.
-768.png)
- Website in the development phase still we can access the website via the Internet with the help of Jenkins Tool
- If we change the code or modify the code in the Github repository then Jenkins automatically fetches the code from the GitHub repository and uploads it to the server.
Note: If we are making changes in the source code (local system) we need to first push it to the GitHub Repository then the build will get triggered in Jenkins automatically by using poll SCM.
-768.png)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport" content=
"width=device-width, initial-scale=1.0">
<style>
body{
background-color: red;
}
h1{
text-align: center;
}
h2{
text-align: center;
}
p{
text-align: center;
font-size: 20px;
}
</style>
<title>geeksforgeeks</title>
</head>
<body>
<h1>GeeksForGeek</h1>
<br>
<h2> Website Development </h2>
<br>
<p> Website Development with Jenkins Job on AWS - EC2</p>
</body>
</html>
- Within a minute, the website will be updated
-768.png)
- Now the website is accessible and It is configured with Continuous Integration & Continuous Development
- The website in the development phase is still accessible and the client can see the changes live and suggest to the development team what type of website they want or the testing team can also start the testing at the same time.
When the developer changes the code in the repository or does the commit with changes in the repository. In every commit, Jenkins will automatically pull the code from GitHub and deploy it into the webserver. It will reflect within a minute it is known as Continuous Integration & Continuous Development.
Similar Reads
DevOps Tutorial DevOps is a combination of two words: "Development" and "Operations." Itâs a modern approach where software developers and software operations teams work together throughout the entire software life cycle.The goals of DevOps are:Faster and continuous software releases.Reduces manual errors through a
7 min read
Introduction
What is DevOps ?DevOps is a modern way of working in software development in which the development team (who writes the code and builds the software) and the operations team (which sets up, runs, and manages the software) work together as a single team.Before DevOps, the development and operations teams worked sepa
10 min read
DevOps LifecycleThe DevOps lifecycle is a structured approach that integrates development (Dev) and operations (Ops) teams to streamline software delivery. It focuses on collaboration, automation, and continuous feedback across key phases planning, coding, building, testing, releasing, deploying, operating, and mon
10 min read
The Evolution of DevOps - 3 Major Trends for FutureDevOps is a software engineering culture and practice that aims to unify software development and operations. It is an approach to software development that emphasizes collaboration, communication, and integration between software developers and IT operations. DevOps has come a long way since its in
7 min read
Version Control
Continuous Integration (CI) & Continuous Deployment (CD)
Containerization
Orchestration
Infrastructure as Code (IaC)
Monitoring and Logging
Microsoft Teams vs Slack Both Microsoft Teams and Slack are the communication channels used by organizations to communicate with their employees. Microsoft Teams was developed in 2017 whereas Slack was created in 2013. Microsoft Teams is mainly used in large organizations and is integrated with Office 365 enhancing the feat
4 min read
Security in DevOps