Jenkins Freestyle Project
We will cover how to create a Freestyle Project in Jenkins and execute shell commands.

Installing Jenkins
Jenkins runs using Java, before install Jenkins you will need to install java. Follow the steps mentioned here to complete installation.
Creating Freestyle Project
Go to “New Item”, select “Freestyle Project”, add name “hello-jenkins”.


Once the project is created, we are displayed the following page with multiple options.
- General: Descriptions and management tasks for the project.
- Source Code Management: Adding a Git repository to the project.
- Build Triggers: Trigger actions for the project to take new build (run).
- Build Environment: Prerequisites needed for the build to run.
- Build: Actual steps/commands that will run.
- Post-build Actions: Steps/Commands that need to run after the build is completed.

Select “Add timestamps to the Console Output” in Build Environment
Select “Execute Shell” in Build.

Enter echo “Hello Jenkins”
in the command prompt to execute command.

Click “Save” and then “Build Now” to run the Project.

Go to the latest build from the Build History margin

Click on “Console Output” to view output of the build.


Click on ‘Back to Project” to take you to the Project page.

Go to “Configure” to change Build steps and execute another command.

Enter the follow commands in command shell
echo "Hello Jenkins" > hello-jenkins.txt
cat hello-jenkins.txt

Save and Build Project. Open Build #2 to check output.

Check Console Output for complete output.

This completes the blog to create a Freestyle Project in Jenkins and execute shell commands.
Stay tuned for more posts on Jenkins.