This is second article from my DevOps Series, in this article we will setup jenkins project on amazon linux.
In first article, we launched and installed Jenkins on Amazon Linux AMI.
Before starting please make sure to have followed below checklist..
Pre-requisites :
- Launch EC2 instance with Amazon Linux
- Install Jenkins (Just follow steps in this first article)
- Github plugin installed on Jenkins
Step 1 : Login and navigate to Jenkins dashboard to create a new project
Next you will see below screen. In that give name to the new project and select freestyle project.
Step 2 : Configure a github project
Step 3 : Setup Build Trigger
Now go to “build trigger” section.
Here you can specify when do you want the build to be done.
By clicking on “poll SCM” you can give a cron entry of the build to be scheduled as show in image below.
Step 4 : Configure Build actions
Now go to “build ” section.
You can input your command here that you will enter for running your project.
Now select “execute shell” option.
Once you have done this you will see below window where you will write down command to be executed during build process.
That was the last step.. Now you first Jenkins project is ready. You should see something like this..
Step 5 : Build and Run your first project
Now you need to execute the project… go ahead and click on “build now” and wait .
You will be able to see the status of build in “build history” section of the page
Then click on “console output” of the build number to see the output of build.
Check the screen below..
After clicking on “Console Output” option you will see what commands have been executed and whats the error or if the project was successfully executed or not.
If the build was successful you will see blue circle as seen in above screen, if error then red circle and if build was aborted in between of execution then grey circle.
That’s it! Your first Jenkins project is finally built and executed.
Let me know if you have any issues in below comment section.
Thanks for reading!
-Bhargav
Credits : Kriti Singh (LinkedIn)
Social Profiles