Send Job changes over email - jenkins

I can see in job page it shows the stories,bug fixes etc in changes tab. Is there a way to extract them and sen over email for each job?

You can use the email-ext-plugin. It has the most customisation possibilities
of the mail plugins as far as I know, but it will require you to write some scripts.
If you go to Add Post Build Action and select Editable Email Notification, you will be able to configure the content of the email in details.
The default content can be configured in the advanced tab. You'll have to create a Groovy script to retrieve the information you want to put in the email. Groovy scripts are powerful in that you can hook into the Jenkins API itself to get any information you want or need. For more details refer to the doc of the plugin.
There are various templates to retrieve commonly used fields such as Changes. If the fields you want to extract are parts of external plugins, there is probably no example for them but they are available to Jenkins' Groovy as well.

Related

I want to get parent issue's custom field data to be inherited to subtask custom field

I want to get parent issue's custom field data to be inherited to subtask custom field without using third party plugins.
Is there any way to do this by Groovy script or any plugin code
How are you going to run your groovy script if you're not going to use a third-party add-on? Typically Script Runner is used to do this because it allows you to easily script fields, postfunctions and/or listeners.
If you want to implement your own add-on, assuming you run a standalone JIRA and not a cloud JIRA, you can start here.
You then have different options to implement what you need. For JIRA Server you could:
Use a listener
Use a postfunction
Use a custom field. For tutorials look here and here.

Determining user access in Jenkins

We would like to get a list of all jobs that a user has access to in Jenkins. This would probably be via a System Groovy Script but I am open to other methods.
We want to be able to test that all security is setup correctly and as admins we see everything so a script like this would be helpful.
This would have the same functionally as the "My View" tab in views.
Scott

use Confluence-publisher-plugin in Jenkins to send build information to Wiki

I know there are some questions regarding this, but didn't get the right answer yet.
I am trying to use Confluence publisher plugin in Jenkins to send build information (Logs, artifacts...) to wikiD page. I can attach artifacts and write plain text to the wiki page. But I'm trying to update/append/prepend wiki page table with build info. I think I might be able to achieve this by using macros but not sure how to use that for data in tables??
does anyone here know how to achieve that?
Sure. I can mention how i did it. There might be different way others will do the same thing.
So, in Confluence, either create a Blank macros as mentioned on Confluence-publisher-plugin wiki and in Jenkins, use "Wiki Markup Replacements" options in plugin configuration to direct your Contents.
OR other option is what i did on mine, was to create table in the wiki and use Cell header ( |cell1||cell2|... ) as Marker Token. then select plain text option, where you enter all the contents that you want to be published in your Wiki.

Is it possible to show all the submits from a Perforce depot without having to select a job?

We are currently attempting to setup an instance of Jenkins as our build system for our code base. We have multiple jobs setup (all using the same depot) to build different sections of the code.
We would now like to show the submits from all users pertaining to this depot on the main Jenkins screen rather than being able to view the change lists involved with a certain build (e.g. by selecting a certain job and then the link leading to the build information, etc...). I've looked into possible plugins and the closest one I was able to find was the "All Changes Plugin". This is exactly what we would like, but this is only visible when viewing the details of a build (e.g. which CLs were used to create the build), but would it be possible to show this type of information on the main Jenkins page instead?
Thank you in advance for your help.
You could write an extension for the Dashboard View plugin to provide a portlet containing an aggregated list of changes from perforce, though if you aren't experienced with writing plugins then you might be better off using a separate repository browser such as Fisheye or P4Web to display your changes.

Configure the ext-mail of hudson

I have a grails project and I use hudson to follow different analysis. I want to send the report analysis (cobertura, codenarc, findbug) to the developer. However, I don't know how to use hudson's ext-mail. Through googling I suspect the solution is to use jelly sscript but I can seem to get it to work.
If the default jelly templates don't have everything you need in them, you can customize them without much effort.
Grab a copy of the default template: Default Jelly Templates
Modify it as needed
Place a copy in JENKINS_HOME\email-templates (create the dir if needed)
Configure the build to utilize the new template. If your new script is ensienne.jelly, the email content would look like this ${JELLY_SCRIPT,template="ensienne"}.
Side Note: Hudson was renamed to Jenkins a while back.
Also, here is a good resource for the email-ext plugin: Email-ext wiki

Resources