如何根据 .NET 代码的输出添加 Cruisecontrol.net 构建步骤
我编写了一些代码,使用 IIS SEO 工具包 API 检查网站是否有损坏的链接。代码的界面很好很简单,如下所示:
public interface ILinkChecker
{
/// <summary>
/// Checks links in the website containing the supplied URL and returns a LinkCheckSummary instance detailing the results.
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>A LinkCheckSummary instance detailing the results of the check.</returns>
LinkCheckSummary CheckLinks(string url);
}
我可以通过检查返回的 LinkCheckSummary
对象来确定是否存在损坏的链接。
我现在想将其集成到我们的 Cruise Control CI 管道中,以便如果 LinkChecker 检测到损坏的链接,则构建会损坏。
我该怎么做?
I have written some code which checks a site for broken links using the IIS SEO toolkit API. The interface for the code is nice and simple, see below:
public interface ILinkChecker
{
/// <summary>
/// Checks links in the website containing the supplied URL and returns a LinkCheckSummary instance detailing the results.
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>A LinkCheckSummary instance detailing the results of the check.</returns>
LinkCheckSummary CheckLinks(string url);
}
I can determine whether there are broken links or not by checking the returned LinkCheckSummary
object.
I would now like to integrate this into our Cruise Control CI pipeline so that if the LinkChecker detects broken links, the build is broken.
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将其包装在 NAnt 任务 中或MSBuild 任务 并将其作为构建。
Wrap this in a NAnt task or an MSBuild task and execute it as a part of the build.