Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
432 views
by Expert (572 points)
I just installed Jenkins. I have all default plugins installed. I even configured the SMTP credentials and tried sending a test mail. All works fine now.

Now in post build step, I have an option to send an email. But, I can send email only when the build is failed or the build is back to normal. It does not have an option to allow me to send an email when build passes.

Kindly advise.

2 Answers

1 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

It looks like you are using "E-mail Notification" option during post build step.

Follow below steps.

  • Click “Add post-build action”
  • Click “Editable Email Notification”
  • Click “Advanced Settings…”
  • Click “Add Trigger”
  • Click “Always”
  • Save

It should help.

0 like 0 dislike
by Expert (570 points)
edited by

To trigger a Jenkinks job for every build, test automation services uses below mentioned steps:

In the job configuration of Jenkins job, test automation services can define various build triggers. For periodical build, test automation services can schedule the build by defining the date or day of the week and time to execute the build.

Below is the format:

MINUTE (0-59), HOUR (0-23), DAY (1-31), MONTH (1-12), DAY OF THE WEEK (0-6)

Examples:
1. Select 'Build Periodically' option under 'Build Tigger' section of a Jenkins job and apply below mentioned data as per the requirement:

a.) Start build daily at a particular time (say 08 in the morning, Monday - Friday):

H 08 * * 1-5

b.) Daily build twice a day (say 12:00  and midnight 00:00, Sunday to Thursday):

H 0,12 * * 0-4


c.) Start build daily in the late afternoon between 4:00 p.m. - 4:59 p.m. or 16:00 -16:59 depending on the projects hash:

H 16 * * 1-5

d.) Start build at midnight for every Saturday:
59 23 * * 6

2. If you want to trigger a job when new code is pushed, then select 'Build when change is pushed to Bitbucket' option under the 'Build Triggers' section of Jenkins Job.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...