> For the complete documentation index, see [llms.txt](https://tkssharma-devops.gitbook.io/devops-training/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tkssharma-devops.gitbook.io/devops-training/devops-01-continuous-integration/continuous-integration-and-continuous-delivery/ci-cd-using-jenkins-ci/jenkins-ci-cd-with-aws/create-a-build-pipeline-basics.md).

# Create a Build Item

### Jenkins Project Build Type&#x20;

* Freestyle Project&#x20;
* Pipeline Project&#x20;

### Create your initial Pipeline as a FreeStyle Project&#x20;

A Jenkins project is a repeatable build job which contains steps and post-build actions. The types of actions you can perform in a build step or post-build action are quite limited. There are many standard plugins available within a Jenkins freestyle project to help you overcome this problem. They allow you to configure build triggers and offers project-based security for your Jenkins project.

[![](https://www.guru99.com/images/1/091318_0458_HowtoCreate1.png)](https://www.guru99.com/images/1/091318_0458_HowtoCreate1.png)

### Creating a Freestyle Build Job

The freestyle build job is a highly flexible and easy-to-use option. You can use it for any type of project; it is easy to set up, and many of its options appear in other build jobs.

**Step 1)** To create a Jenkins freestyle job, log on to your Jenkins dashboard by visiting your Jenkins installation path. Usually, it will be hosted on localhost at [http://localhost:8080](http://localhost:8080/) If you have installed Jenkins in another path, use the appropriate URL to access your dashboard.

**Step 2)** Click on "**New Item**" at the top left-hand side of your dashboard

**Step 3)** In the next screen,

1. Enter the name of the item you want to create. We shall use the "Hello world" for this demo.
2. Select Freestyle project
3. Click Okay

[![](https://www.guru99.com/images/1/091318_0458_HowtoCreate4.png)](https://www.guru99.com/images/1/091318_0458_HowtoCreate4.png)

**Step 4)** Enter the details of the project you want to test.

[![](https://www.guru99.com/images/1/091318_0458_HowtoCreate5.png)](https://www.guru99.com/images/1/091318_0458_HowtoCreate5.png)

**Step 5)** Under Source Code Management, Enter your repository URL. We have a test repository located at my repo

![](https://3776180966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgLv25e2BrxRC5m6flh%2F-LjfLdSr67yxbNc2U1hg%2F-LjfWpFxqL1fC1rYrMVB%2FScreen%20Shot%202019-07-13%20at%206.58.21%20PM.png?alt=media\&token=04e7f6e0-b2b6-445f-97ef-c6bd00c54597)

It is also possible for you to use a local repository.

If your GitHub repository is private, Jenkins will first validate your login credentials with GitHub and only then pull the source code from your GitHub repository.

**Step 6)** Now that you have provided all the details, it's time to build the code. Tweak the settings under the **build** section to build the code at the time you want. You can even schedule the build to happen periodically, at set times.

Under **build**,

1\. Click on "**Add build step**"

2\. Click on "**Execute Shell command**" and add the commands you want to execute during the build process.

![](https://3776180966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgLv25e2BrxRC5m6flh%2F-LjfLdSr67yxbNc2U1hg%2F-LjfWXr2hUGBveWarCOQ%2FScreen%20Shot%202019-07-13%20at%206.59.19%20PM.png?alt=media\&token=4c6f9196-1ace-4575-97aa-7fb778adff08)

**Step 7)** When you have entered all the data,

1. Click **Apply**
2. **Save** the project.

**Step 8)** Now, in the main screen, Click the **Build Now** button on the left-hand side to build the source code

**Step 9)** After clicking on **Build now,** you can see the status of the build you run under **Build History**

![](https://3776180966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgLv25e2BrxRC5m6flh%2F-LjfLdSr67yxbNc2U1hg%2F-LjfXKrr-YqUbjT-tJRl%2FScreen%20Shot%202019-07-13%20at%207.02.44%20PM.png?alt=media\&token=56176cdb-6ac5-4dd5-8ac3-f9760197594c)

**Step 10)** Click on the **build number** and then Click on **console output** to see the status of the build you run. It should show you a success message, provided you have followed the setup properly

### Lets add Github Trigger to run Jenkins Pipeline&#x20;

![](https://3776180966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgLv25e2BrxRC5m6flh%2F-LjfLdSr67yxbNc2U1hg%2F-LjfaWsFL6czv9X_QYjD%2FScreen%20Shot%202019-07-13%20at%207.21.03%20PM.png?alt=media\&token=15623834-924c-420b-97fc-39580ee08829)

![Create webhook  on github](https://3776180966-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgLv25e2BrxRC5m6flh%2F-LjfLdSr67yxbNc2U1hg%2F-LjfYa45nszE2-4GDqEF%2FScreen%20Shot%202019-07-13%20at%207.06.22%20PM.png?alt=media\&token=c5ddabb3-112b-4cde-ad7a-b6a2c302ef86)

Just save this and send git commits to this repo, it will trigger Jenkins Build and you will se Build running on Jenkins console
