Getting E-Mail Notification:

48 views
Skip to first unread message

ajay.d...@gmail.com

unread,
Dec 8, 2016, 5:51:06 PM12/8/16
to Jenkins Users
I want to know to how can a user (User1) get E-mail Notification, when he does the following:

i) User1 commits changes to GitHub in a Repo (Repo1)

ii) A Build in Travis CI server gets triggered whenever any changes committed to Repo1. This Build job in travis internally triggers jenkins job apart from doing other things.

iii) I want the User (User 1) gets notified from jenkins job, when jenkins job fail.

Can anybody help me out on this!

Slide

unread,
Dec 8, 2016, 6:09:40 PM12/8/16
to Jenkins Users

i and ii are out of the scope of this mailing list, but there is the Mailer plugin and email-ext plugin for iii as long as you can pass the user information to the Jenkins job from Travis


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b2dbda75-7419-43db-80a4-fb8d6d552c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ajay.d...@gmail.com

unread,
Dec 8, 2016, 6:28:17 PM12/8/16
to Jenkins Users
Fine.
May I know, how can we pass user information from Travis to Jenkins automatically.
I can see the user info in Travis who caused the build.

Slide

unread,
Dec 8, 2016, 6:42:28 PM12/8/16
to Jenkins Users

ajay.d...@gmail.com

unread,
Dec 10, 2016, 12:47:07 PM12/10/16
to Jenkins Users
Hi,

Thanks for the info.
I want to know how to fetch the parameter of GitHub Committer email id in GitHub Repository code. So that I can pass the committer email id parameter into my jenkins Job-parameterized build.

Thanks,
Ajay.

2016 at 3:42:28 PM UTC-8, slide wrote:Aj

On Thursday, December 8,

Slide

unread,
Dec 10, 2016, 1:18:19 PM12/10/16
to Jenkins Users

That would be done on the Travis side, so you'd have to figure that out under Travis.


ajay.d...@gmail.com

unread,
Dec 10, 2016, 1:29:29 PM12/10/16
to Jenkins Users
Travis is requesting parameters from GitHub repository only.
I found the place where parameters are getting populated in GitHub Repository.
I want to add committer/author emaild id at the same place.
So, I was checking out how to fetch the committer/author email id in code.

Indra Gunawan (ingunawa)

unread,
Dec 14, 2016, 11:17:49 AM12/14/16
to jenkins...@googlegroups.com

I am not sure how Travis supports git.  In Jenkins Git plugin provides env variables available to Jenkins for free:

 

Environment variables

The git plugin sets several environment variables you can use in your scripts:

  • GIT_COMMIT - SHA of the current
  • GIT_BRANCH - Name of the branch currently being used, e.g. "master" or "origin/foo"
  • GIT_AUTHOR_EMAIL - Committer/Author Email
  • GIT_COMMITTER_EMAIL - Committer/Author Email

 

 

However I would suggest that you script a python snippet one-line code to fetch the  Github information you need directly from Github REST API using “github” python module. 

I use “PyGithub” python module.

 

-Indra

Reply all
Reply to author
Forward
0 new messages