TESTEROPS

A pragmatic approach to QA and OPS

Creating and Scheduling a Job

Now that we have successfully configured our Jenkins and applied user level security settings on it, it’s time Jenkins serves it purpose. So we will now schedule and run a demo job using Jenkins.

Once you login into Jenkins, you will see this right out of the blue, asking you to create your first job. We would click it so that is takes us to next page.

Screenshot from 2015-06-26 10:30:29
From the various options, select “Freestyle Project” since we are creating a demo job.

Screenshot from 2015-06-26 10:32:08

You need to provide a suitable name for this. I name it rahulj1

Screenshot from 2015-06-26 10:32:21

Enter a suitable description for this job. Next come down to the section  that says Source Code Management. This allows us to use version control systems like CVS and Subversion. Don’t click anything in here. Just keep the default options. Go to the section that says Build

Select Execute Shell from the drop down options.

Screenshot from 2015-06-26 10:33:20

Give the specific shell command that you want to execute. For this example, I’ll use the uptime command

Screenshot from 2015-06-26 10:33:41

Click Save. Your first job is ready to be run. The job opens up. You’ll see a Build Now option on the left. Click on that.

The job will start executing. Let the job run. Once it is completed, you will see the Build History coming up, with the job run details and RSS feeds.

Screenshot from 2015-06-26 10:34:13

Click on the circular icon showing for the job. It will show you the Console output for this job.
Screenshot from 2015-06-26 10:34:40

In the next tutorial we will learn how we would schedule a job to run at a specific time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: