Jenkins - Day - 2
Published: 2023-10-08 17:35:20

> **<u>Content</u>**

1. Password Creation.
2. How to send email notification ?
3. Log location of Jenkins .

<u>Creation of Password from **GMAIL**:</u>

- Goto to the respective e-mail and set the 2-factor authentication.
- Then enable APP password.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w98k23dk5wy3yo1wsriu.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vs5vc3nehoba67ebqxmj.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2crltdsq82fp8ehkczr.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uqpyhvzk6h25sdaeojx.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tolcqf5y15whw9qw7b27.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uf7ovs49fmro7jg8ao9y.png)

**_wxu ul00s xddd xvlo_** While you are entering this password in Jenkins make sure you need to remove the space.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ws9e8hpa7sar1h4avf8.png)

**Email Extension Template Plugin** is the plugin which is required to send message.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0mnzrmb6mkdyc60w56r9.png)

**<u>Configure the EMAIL to the Jenkins :</u>**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hldrt4z3qspy0emp03vj.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nysuh81g112lbaln898g.png)

**<u>Now set the gmail SMTP server to get the notification :</u>**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sm1bj3ga9yjeh8w6zmmb.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ve6c741q76qbu5fp13cl.png)

_Enable the test mail and check whether you are getting the mail,_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzy3loltcajk061h87g3.png)

_Now test the configuration,_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybfg876jlsagwut5rhy4.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drq8yiw277rkbcwtkwey.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vs3xjvq5ybfve2prj2ge.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u957dyz5gn43f8d7wv6z.png)

_Now go to "Extended E-mail Notification",_

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzi9uvkw6xrdmwflembz.png)

**Always ---> it will give all the logs to your mail ID.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8379pg9epmn1fr20boz5.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crl8impfu5uz5o4gin5e.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1uajujlz8sp5hto4ei9i.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qj607j1irt5enokxv68k.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/406f2imx48qv2ecyw595.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yahlumgm52kvsf1m0k27.png)

### Click ADD

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf8joaxu729ul1kpwe10.png)

### Save all the Changes and Now create a Project and test the email notifications.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzzctezfv6f7wmhtb6gy.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m3dnuwb5jt7sdhiu156.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8360jfs3ekoj61g35ii.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xs7gq4pei5lc7bjg1qoi.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37j3u2q9elu6vgjgrj6n.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/byq5wy97w7exajfmvuf9.png)

Here you can give many EMAIL ID's like all the members of the team. Note : This is ONLY FOR THIS PROJECT alone.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6p76nuafosaxq0dq5z8.png)

### Now CLICK build NOW

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lii6xx1210aflg815byp.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xv9f3m9onk8ahdm6a2u5.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o4ip5kuex5t60f6efgdg.png)

If you notice keenly , from mail ID is like " address not configured yet " , that is configured here . Requesting to change accordingly.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/341qzubqurj9xyg5j7j9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tzdhltkbew7fitt2fa9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p53xywxtbc246zgpwh0s.png)

### Where LOGS are stored ?

```
/var/lib/jenkins/jobs/
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9v1j4nimjyetqqrhvow.png)

```
/var/lib/jenkins/jobs/TestEmailNotification/builds
/var/lib/jenkins/jobs/TestEmailNotification/builds/1/log
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/el83851p5ohrg7n8ioqx.png)

**<u>List of Error's :</u>**

1. Email not sent :

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4g7fu3qdn7rsnmv6mn32.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4qvcvw2vzkdujqx7vdm.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z75hm9thz9blw30sme4i.png)