Posts

Showing posts from May, 2020

Jenkins : Email notification on job failure

Image
Introduction In this article, I will show you how to send email notification in case of job failure. 1.    Install 'Mailer plugin for Jenkins' 2.    Configure Mailer plugin to use 3.    Create Job named TestEmailJob Step1: Install 'Mailer plugin for Jenkins' Go to Home->Manage Jenkins->Manage Plugins->Installed tab. Look for the Mailer plugin as shown below. By default, it is installed when Jenkins is installed. If not then it can be installed here. Step2: Configure 'Mailer plugin' to use Go to Home->Manage Jenkins->Configure System->E-mail Notification section. Fill up the SMTP server details as shown below. And there is a Test Configuration option in the section to check whether it is working or not. Step3: Create Job named TestEmailJob Go to Home->New Item and create new job named TestEmailJob as shown in previous examples. Now go to TestEmailJob->Configure->Build section.  Here, I have intentionally, 'echo' spelling is wr...

Jenkins : Triggering Jobs in Sequence

Image
Introduction In this article, I will show you how to trigger jobs in sequence in Jenkins 1.      Create Job TestJob1 2.     Create Job TestJob2 3.     Build Job    TestJob1 Step1: Create Job TestJob1 Create a FreeStyle Project named TestJob1 as shown in blog titled ' Step by step guide for Jenkins FreeStyle Project ' After that go to TestJob1->Build tab and add buid step as shown below: Step2: Create Job TestJob2 Same way create TestJob2. But message in Command keep as 'Test Job2 executed successfully'. Now here, I want to execute TestJob2 automatically after TestJob1 is executed.  So go to TestJob2->BuildTriggers section and make the changes as shown below: Step3: Build TestJob1 Now, Go to Home->TestJob1 and click Build Now button shown in left menu. It will build the TestJob1 which can be shown in Build History marked  as shown in image You can view the console for the Build #1 for TestJob1 by going to Build History->#...