• ccnet+ncover+fxcop+web deploy+mstest


    <cruisecontrol xmlns:cb="urn:ccnet.config.builder">
    <project>
    <name>Hello</name>
    <webURL>http://localhost/ccnet/server/local/project/Hello/ViewProjectReport.aspx</webURL>
    <triggers>

    <intervalTrigger seconds="3600"/>
    <scheduleTrigger time="10:30" buildCondition="ForceBuild" name="Scheduled">
    <weekDays>
    <weekDay>Friday</weekDay>

    <weekDay>Sunday</weekDay>

    </weekDays>
    </scheduleTrigger>
    </triggers>
    <labeller type="dateLabeller"/>
    <modificationDelaySeconds>2</modificationDelaySeconds>
    <artifactDirectory>C:\WebSite\Hello\Log</artifactDirectory>
    <sourcecontrol type="svn">
    <trunkUrl>http://localhost:81/svn/Hello</trunkUrl>
    <executable>C:/Program Files (x86)/VisualSVN Server/bin/svn.exe</executable>
    <workingDirectory>C:\WebSite\Hello\WorkingDirectory</workingDirectory>
    <username>xxx</username>
    <password>xxx</password>
    </sourcecontrol>

    <tasks>

    <conditional>
    <conditions>
    <buildCondition>
    <value>ForceBuild</value>
    </buildCondition>
    </conditions>
    <tasks>

    <msbuild>
    <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
    <workingDirectory>C:\WebSite\Hello\WorkingDirectory</workingDirectory>
    <projectFile>Hello.sln</projectFile>
    <buildArgs></buildArgs>
    <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    <targets>Build</targets>
    </msbuild>

    <exec executable="C:\WebSite\Hello\package.bat"/>

    <exec executable="C:\WebSite\Hello\deploy.bat"/>

    <exec executable="C:\WebSite\Hello\WorkingDirectory\Fxcop.bat" />

    <exec executable="C:\WebSite\Hello\delete.bat"/>
    <exec executable="C:\WebSite\Hello\WorkingDirectory\test.bat" />
    <exec executable="C:\WebSite\Hello\WorkingDirectory\localhost.bat" />
    </tasks>
    <elseTasks>

    <msbuild>
    <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
    <workingDirectory>C:\Users\xmwei\Desktop\Hello</workingDirectory>
    <projectFile>Hello.sln</projectFile>
    <buildArgs></buildArgs>
    <logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
    <targets>Build</targets>
    </msbuild>
    <exec executable="C:\WebSite\Hello\Fxcop.bat"/>

    <exec executable="C:\WebSite\Hello\delete.bat"/>
    <exec executable="C:\WebSite\Hello\ncovermstest.bat"/>
    <exec executable="C:\WebSite\Hello\ncoverexplorer.bat"/>

    </elseTasks>

    </conditional>

    </tasks>
    <publishers>
    <buildpublisher>
    <sourceDir>C:\WebSite\Hello\WorkingDirectory</sourceDir>
    <publishDir>C:\WebSite\Hello\HistoryVersion</publishDir>
    </buildpublisher>
    <merge>
    <files>
    <file>C:\WebSite\Hello\Log\DailyBuild.FxCop.xml</file>
    <file>C:\WebSite\Hello\Log\coverage.xml</file>
    <file>C:\WebSite\Hello\Log\NCoverExplorer.Xml</file>
    <file>C:\WebSite\Hello\Log\testResults.trx</file>
    </files>
    </merge>
    <xmllogger logDir="C:\WebSite\Hello\Log\buildlogs"/>
    <modificationHistory onlyLogWhenChangesFound="true"/>
    <statistics/>
    </publishers>
    </project>
    </cruisecontrol>

    delete.bat

    cmd.exe /c if exist C:\WebSite\Hello\Log\testResults.trx del /Q C:\WebSite\Hello\Log\testResults.trx

    Fxcop.bat

    FxCopCmd /project:C:\WebSite\Hello\WorkingDirectory\fxcop.FxCop /out:C:\WebSite\Hello\log\DailyBuild.FxCop.xml

    ncovermstest.bat

    ncover.console.exe "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:"C:\WebSite\Hello\WorkingDirectory\Test\TestProject1\bin\Debug\TestProject1.dll" /resultsfile:C:\WebSite\Hello\Log\testResults.trx //p "Hello" //x C:\WebSite\Hello\Log\coverage.xml

    ncoverexplorer.bat

    NCoverExplorer.Console.exe C:\WebSite\Hello\Log\coverage.xml /xml:C:\WebSite\Hello\Log\NCoverExplorer.Xml /r:ModuleClassSummary

    package.bat

    msbuild "C:\WebSite\Hello\WorkingDirectory\Hello\Hello.csproj" /t:Package

    deploy.bat

    msdeploy -source:contentpath="C:\WebSite\Hello\WorkingDirectory\Hello\obj\Debug\Package\PackageTmp\" -dest:contentpath="c:\deploy",includeAcls=false,computername="https://10.2.3.122:8172/msdeploy.axd?Site=Test",authType=Basic,userName=administrator,password=pass@word1 -allowUntrusted -verb:sync

    localhost.bat

    msdeploy -source:contentpath="C:\WebSite\Hello\WorkingDirectory\Hello\obj\Debug\Package\PackageTmp\" -dest:contentpath="D:\deploy" -verb:sync

    msdeploy -verb:sync -source:contentpath="C:\WebSite\Hello\WorkingDirectory\Hello\obj\Debug\Package\PackageTmp\" -dest:contentpath="C:\wxm\deploy" -skip:absolutePath=Web.config

  • 相关阅读:
    Springboot整合Thymeleaf,Thymeleaf页面引入静态资源
    SpringBoot 使用thymeleaf 跳转页面时,总是提示404找不到页面
    项目报错:jdbcUrl is required with driverClassName.
    Springboot配置拦截器无法跳转登录页面
    查看 SELinux状态及关闭SELinux
    Solaris平台,如何通过端口号快速查看PID(进程)
    getApplicationContext()、getBasecontext()、getApplication() 、getParent()
    android工程下不能运行java main程序的解决办法
    SDCardUtils
    BaseAdapter
  • 原文地址:https://www.cnblogs.com/GreenGrass/p/2767624.html
Copyright © 2020-2023  润新知