How do I format jenkins to create a server email so that the content is not on the same line?

I used hudson in this past and am very happy with it. It seemed to work well.

I recently installed jenkins and configured an editable email plug-in.

Jenkins Version: 1.513 Email Version-ext: 2.28

Unfortunately, when I try to add other tokens / move by email by default, it just adds all the tokens on one line.

This is confusing. I have an email configured for html.

Any tips on how to format this better?

The default email address (not editable) works fine, but I need more useful information.

Unfortunately, the format of this message makes it close to useless.

here is my editable content:

$BUILD_TAG $BUILD_ID $SVN_REVISION $CHANGES $CAUSE $DEFAULT_CONTENT $WARNINGS_NEW $WARNINGS_COUNT 

Email received here:

jenkins-DotNet-43 2013-05-13_16-09-40 7481 [kevin] -help layout Starts with changing the SCM DotNet - Build # 43 - Success: check the console output at http: // [buildserver]: 8080 / job / DotNet / 43 / to view the results. [kevin] -help layout Starts with changing the SCM [... 142 lines are truncated ...] CopyFilesToOutputDirectory: copy the file from "obj \ Release \ Model.Wpf.dll" to "bin \ Release \ Model.Wpf.dll" Model.Wpf β†’ C: \ Jenkins.jenkins \ jobs \ DotNet \ workspace \ dotnet \ Messenger \ Model \ Model.Generic \ bin \ Release \ Model.Wpf.dll Copying the file from "obj \ Release \ Model.Wpf.pdb" in "bin \ Release \ Model.Wpf.pdb". Done Building Project "C: \ Jenkins.jenkins \ jobs \ DotNet \ workspace \ dotnet \ Messenger \ Model \ Model.Ge

EDIT

Note: when I put the "<BR>" records between the elements, they are separated by a line in the letter. Unfortunately, although the tokens themselves (for example, in the list of changes) do not contain line line separators - for example, several commits are listed on one line.

The content is there, but it's hard to decipher. There seems to be a bug in the mail plugin or some other related system.

+4
source share
1 answer

You have already noticed that you need to actually use line breaks in HTML between tokens so that they do not appear on one line, so I’ll just answer the question about multiple change log entries on one line.

From the contents token reference, bold mine:

$ {CHANGES, showPaths, showDependencies, format, pathFormat} Displays the changes since the last build.

  • showDependencies - if true, changes are displayed in projects that depend on the assembly.

    The default is false.

  • showPaths - if true, paths changed by the commit are displayed.

    The default is false.

  • format - for each committed commit, a string containing% X, where% X is one of% a for the author,% d for the date,% m for the message,% p for the paths, or% r for revision. Not all revision systems support% d and% r. If specified, showPaths is ignored.

    The default is "[% a]% m \ n".

  • pathFormat is a string containing% p to indicate how to print the paths.

    The default is "\ t% p \ n".

The non- ${CHANGES} token is configured to display in text format. You need to configure it so that it displays correctly in the HTML environment.

Example: <ul>${CHANGES, format="<li>[%a] %m</li>"}</ul>

+9
source

Source: https://habr.com/ru/post/1480571/


All Articles