Day 25 Task: Complete Jenkins CI/CD Project - Continued with Documentation

Akanksha SinghAkanksha Singh
2 min read

Task-01

  • Document the process from cloning the repository to adding webhooks, Deployment, etc. as a README, go through this example

  • A well-written readme file will help others to understand your project and you will understand how to use the project again without any problems.

TO clone the repository

$ git clone <repo-url>

create an instance name on AWS

install the required things. in my project java and docker and docker-compose and Jenkins (already defined in day22) required

$ sudo apt update

$ sudo apt install openjdk-11-jre

$ sudo apt install docker.io

$sudo apt install docker-compose

Give permission to docker

sudo usermod -aG docker $USER

Create a new Jenkins freestyle project for our app.

Note -We have already installed and launched Jenkins in instance on AWS in day 22

create a new item in jenkins

Note- Make sure the branch from github and the branch name in the branch specification below

In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container

Add a second step to run the "docker run" command to start a container using the image created in step 6 and save

now click on build now

build has been successful

output:

1
Subscribe to my newsletter

Read articles from Akanksha Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Akanksha Singh
Akanksha Singh