Jenkins使用电子邮件插件发送附件(Jenkins sending attachments with email plugin)
我试图在Jenkins中测试失败时附加文件。
我正在使用电子邮件扩展插件作为尝试实现此目的的一种方法,但我对语法感到困惑。
如果我只是在附件字段中放入“index.php”(不带引号),它将正确发送附件。
如果我尝试进一步进入工作区,例如“myfolder / myfile.php”(不带引号),电子邮件将不会发送。 我已经尝试了许多变种,使用通配符并尝试专门定位文件,但没有运气。
我当然看到这里http://ant.apache.org/manual/Types/fileset.html但似乎没有任何效果。
I'm trying to attach a file when a test fails in Jenkins.
I'm using the email extension plugin as a means of trying to achieve this but I'm stumped by the syntax.
If I simply put "index.php" (without quotation marks) in the attachment field it will send out the attachment correctly.
If I try and go further into the workspace e.g."myfolder/myfile.php" (without quotation marks) the email wont send. I've tried a number of variants, using wildcards and trying to target files specifically but with no luck.
I have of course looked here http://ant.apache.org/manual/Types/fileset.html but nothing seems to work.
原文:https://stackoverflow.com/questions/14853722
最满意答案
使用IIS Rewrite模块并在web.config中进行设置:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name="Redirector" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{PATH_INFO}" pattern="/*" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/default.aspx?q={PATH_INFO}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Use the IIS Rewrite module and the set it up in the web.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name="Redirector" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{PATH_INFO}" pattern="/*" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/default.aspx?q={PATH_INFO}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
相关问答
更多-
嗯,答案被证明是令人沮丧的简单 - 只是一个绝对的猪找到。 我没有使用REQUEST_URI(获取整个请求的URL,包括查询字符串),而是使用了URL(只获取了没有查询字符串的URL),这似乎彻底解决了我的问题。 Well, the answer proved to be depressingly simple - just an absolute pig to find. Instead of using REQUEST_URI (which gets the whole requested URL, i ...
-
IIS7 URL在QueryString之后重写模式查询模板(IIS7 URL Rewrite Patterns Query Template after QueryString)[2022-06-22]
$表示查询字符串的结尾 - 您需要在结尾处保留该字符串。 尝试: ^([^/]+)/financial/?$ $ means the end of the query string - you need to leave that at the end. Try: ^([^/]+)/financial/?$ -
可以在IIS上使用URL重写进行基本身份验证。 您应该在服务器变量HTTP_Authorization中添加值Basic,然后在base64中添加username:password。 请记住在允许的变量中添加变量 所以对于用户密码打开芝麻的用户阿拉丁你的格式是阿拉丁:打开芝麻和base64编码QWxhZGRpbjpvcGVuIHNlc2FtZQ ==。 转换为授权:基本QWxhZGRpbjpvcGVuIHNlc2FtZQ ==
IIS URL重写(IIS URL Rewrite)[2021-12-31]
这很有可能。 您需要将{REQUEST_URI}的URL编码值添加到重写URL。所以,答案就此而言,据我所知 - 设置我所描述的哈希是不可能的,但有两个,我可以重定向^Type=([^=&]+)&Series=([^=&]+)&(.+)到不同的网址, {R:1}/product-details/{C:1}/{C:2}?{C:3}#search 。 AppendQueryString在这里是假的,因为我已经用&(.+) =>捕获了其他查询字符串?{C:3} 但是,我还找到了另一种解决方案,即只使用Javascript / JQuery动画,在Jav ...这解决了在我给出答案之前,向微软的Yuk Ding大喊大叫,他在iis.net论坛上回复了这篇文章的副本并提供了大部分答案。 所以我们在这里,如果你想要重写规则,从1个URL重定向到另一个URL,维护路径和查询字符串,如果它们存在,同时添加硬编码的URL参数和相应的&或? 那么这里是你需要的规则。 在您从my.test.com重定向到www.test.com的规则中,但显然您需要在下面的规则中替换这两个URL,并将硬编码参数“ExtraParam = SomeValue”更改为您需要的内容。使用IIS Rewrite模块并在web.config中进行设置:... ^((?!regex)。)* $正则表达式不包含正则表达式。 在这里阅读更多http://bloggernitin.blogspot.in/2007/12/regex-for-doesnt-contain.html 如果你正在寻找像lon = xyz这样的东西在params中不存在那么使用这个正则表达式^(?!lon =(xyz))这将检查lon param是否在字符串的开头不存在 更多例子 - 如果您遇到只有缩放参数的情况,则会出现查询字符串并且缺少lat / lon 例如,查询字符串a)“lat = 2 ...IIS 7重写规则 - 基于查询字符串的存在重定向(IIS 7 rewrite rule - redirect based on presence of querystring)[2022-09-15]
deeholzman,我相信您的条件 - 添加输入示例您要使用“模式”而不是“matchType”。 EX:要么 I found the answer in the URL Rewrite Module Configuration Refere ... 相关文章
更多- jQuery Chosen Plugin介绍
- 用了convention-plugin 这个插件,怎么做下载呢
- Hadoop1.0 Eclipse Plugin-作业提交
- 配置 生成hadoop-eclipse-plugin jar包
- Hadoop开发环境搭建及配置Hadoop Eclipse Plugin
- Ubuntu 12.04上编译hadoop-eclipse-plugin-1.0.4.jar包
- 彻底解决Hadoop-0.20.203.0-Eclipse-plugin插件安装
- 《wordpress插件制作视频教程》(How to create a wordpress plugin)全5集更新完毕[HDTV]
- Eclispe3.5之Hadoop-0.21.0-eclipse-plugin安装后点击无效解决办法
- Hadoop 0.20.0+RHEL 5+Eclipse plugin+Makefile开发环境搭建
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)