# #Day 23 : Jenkins Freestyle Project for DevOps Engineers.

Hello , Everyone, This is my 23 blog started my day23 as AWS DevOps Engineer #90daysofchallenge with ShubhamLondhe #devops #trainwithshubham

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708058827144/3ed10065-0ee0-48ea-9961-ea958cf5329e.png align="center")

## What is CI/CD?

* CI or Continuous Integration is the practice of automating the integration of code changes from multiple developers into a single codebase. It is a software development practice where the developers commit their work frequently into the central code repository (Github or Stash). Then there are automated tools that build the newly committed code and do a code review, etc as required upon integration. The key goals of Continuous Integration are to find and address bugs quicker, make the process of integrating code across a team of developers easier, improve software quality and reduce the time it takes to release new feature updates.
    
* CD or Continuous Delivery is carried out after Continuous Integration to make sure that we can release new changes to our customers quickly in an error-free way. This includes running integration and regression tests in the staging area (similar to the production environment) so that the final release is not broken in production. It ensures to automate the release process so that we have a release-ready product at all times and we can deploy our application at any point in time.
    

## What Is a Build Job?

A Jenkins build job contains the configuration for automating a specific task or step in the application building process. These tasks include gathering dependencies, compiling, archiving, or transforming code, and testing and deploying code in different environments.

Jenkins supports several types of build jobs, such as freestyle projects, pipelines, multi-configuration projects, folders, multibranch pipelines, and organization folders.

## What is Freestyle Projects ??

A freestyle project in Jenkins is a type of project that allows you to build, test, and deploy software using a variety of different options and configurations. Here are a few tasks that you could complete when working with a freestyle project in Jenkins:

# Task-01

Ans:-jenkins is a powerful open source tool that facilitates continuous integration n continuous delivery ( CI/CD ) in software development. its written in java n provides a platform for automating various stages of the software development lifecycle.  
  
what sets jenkins apart is its ability to create pipelines which are workflows that define the steps required to build , test n deploy software. these pipelines can be customized to suit the specific needs of a project , allowing for seamless integration of different tools n technologies.  
  
jenkins achieves this flexibility through its extensive plugin ecosystem. these plugins enable integration w popular development tools such as git , maven n docker among others. by installing the necessary plugins developers can easily incorporate these tools into their CI/CD workflows.  
  
the benefits of using Jenkins are numerous. it promotes collaboration n efficiency by automating repetitive tasks reducing manual effort n providing real time feedback on build n test results. it also allows for easy scalability , as jenkins can distribute work across multiple machines or even cloud based environments.

# Task-02

* Create Jenkins project to run "docker-compose up -d" command to start the multiple containers defined in the compose file (Hint- use day-19 Application & Database docker-compose file)
    
* Set up a cleanup step in the Jenkins project to run "docker-compose down" command to stop and remove the containers defined in the compose file.
    

Ans:-To create a freestyle pipeline in jenkins that prints the message “ Hello World ,, follow these steps :  
  
1\. open the Jenkins web interface n navigate to the Jenkins home page.  
2\. click on “ New Item ,, to create a new job.  
3\. enter a name for your job n select “ Freestyle project ,,  
4\. configure the job settings as desired such as the source code management system n build triggers.  
5\. in the Build section click on “ add build step ,, n select “ execute shell ,, ( for linux ) or “ execute windows batch cmnd ,, ( for Windows )  
6\. in the cmnd box enter the cmnd to print the message such as echo " hello world ,,  
7\. save the job configuration.  
8\. run the job by clickin on “ build now ,,  
  
once the job is executed jenkins will run the specified cmnd display the “ hello world ,, message in the console output.
