English 中文(简体)
如何在Jenkins电子邮件报告中插入外部数据?
原标题:How to insert external data in the Jenkins email report?

能否通过执行 shell 构建步骤中所执行的脚本生成的数据并将其插入电子邮件报告。 我使用电子邮件插件和 Jelly 模板 。

最佳回答

使用 < a href=> "https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin" rel = "不跟随 noreferr" > EnvInject 插件 来将变量“向外”传播。 < a href=> https://stackoverflow.com/a/10626193/118189" 这是你如何做到这一点 。

问题回答

我使用基于 grooovy 的电子邮件模板。 请参阅下面我找到的。 也许在 Jelly 模板中也会有所帮助 :

<%
    import hudson.model.*

    def YOUR_VARIABLE= build.getEnvVars()["SOME_BUILD_PARAMETER"];
%>

然后你就可以使用

${YOUR_VARIABLE}




相关问题
Configure hudson to build multiple branches

I use an ant file to build a java project in mercurial through hudson. The mailnine has a hudson job running just fine. Recently a new branch was created and pushed to the server by commnd line: hg ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using Hudson and build steps with multiple git repositories

I m trying out Hudson to replace our current Buildbot setup. I installed the git plugin. Our current setup is like: ssh://server:/repo/test_framework.git ssh://server:/repo/project_a.git Now, to ...

use hudson to get remote tests results

I ve a server running a proprietary language on which I m able to run "unit tests" in this language. I cannot install a Hudson slave on this machine, but would like to have these tests results ...

Where do I see the shell script output in Hudson

I have written a shell script to build my project using hudson. I have put some comments that will be displayed on the console by using echo command. This will help me to debug the scripts if there ...

Why am I getting handshake_failure with Java SSL cert?

I m trying to use Hudson (which uses SVNKit) to access a Subversion repository that requires a client certificate to access it. I can access the same repository using the same client certificate via ...

热门标签