Jenkins Series 2 - How to Create my First Job in Jenkins

Before share how to use Jenkins to build complex pipelines and create trends or build, sharing how to create your 1st Job in it.Click on the New Job. It will open a New Window with different Options.

Create a New Job




In the New Window you will see screen like below add the name of Job you want to create.
Provide the Name of the Job
Once Name is given, as a next step choose Add a Build Step. This is the place where you define what steps your Jenkins Job should perform. You can pick Windows or Unix Shell based on where you want to execute your command or scripts. In my example I have taken Windows. There are various other options available which you can play around once comfortable with Jenkins and you really need them.

Choose the Shell Want for Build Step

Once Shell is available add command or your batch file, shell script or any other steps want to perform. I have given only ls -l command and saved it. This is the place which really gets executed within the Slave (we discuss in other blog) a kind of compute node where process intended to be executed. In this case as you do not have anything registered other than master, it will run on the same machine where Jenkins is deployed and will provide you listing of workspace directory. It is a folder where Jenkins by default perform activities. You can use custom workspace as well (we discuss in other blog).




Once you click on Save will leads to following Screen and provide you Build Now Options
Click on Build Now to execute above step
On sucessfull execution you will see the results.
 Can click on the Console Output to see details of the Logs. Since we haven;t selected specific framework or selected reporting you will see console log by default for the steps executed above as it opens a Shell or Command Prompt and execute the steps.

Console Output

Hope now you have created your 1st Job on the Jenkins and ready for an interesting journey. Will discuss in coming blogs on how can register slave from the command line, what infect slave is, how we can consolidate results and run different kind of frameworks. So Stay Tuned.

-Ritesh
Disclaimer: The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions