zoukankan      html  css  js  c++  java
  • Jenkins .net windows

    一、安装
    1、JDK 1.7以上
    安装完成后,添加环境变量

    JAVA_HOME:C:Program Files (x86)Javajdk1.7.0_21
    Path:%JAVA_HOME%in;
    通过cmd: javac 验证是否安装成功

    2、jenkins安装
    http://jenkins-ci.org/ 下载安装包
    http://localhost:8080 启动配制

    powershell

    服务器白名单
    PS C:Users53738> winrm set winrm/config/client '@{TrustedHosts="*"}'

    所有的环境服务器需要安装PowerShell,同时开启远程访问

    PS C:Users53738> winrm quickconfig

    3、配制
    构建:
    ErpErp.UIErp.UI.WebErp.UI.Web.csproj
    /t:Rebuild /p:Configuration=Release;VisualStudioVersion=14.0;WebProjectOutputDir=E:Jenkins_Publish;OutputPath=E:Jenkins_Publishin 
    /t:ResolveReferences;Compile /t:_CopyWebApplication /p:Configuration=Release /p:WebProjectOutputDir=C:Jenkins_Publish /p:OutputPath=C:Jenkins_Publishin  

      

         /t:Rebuild /p:Configuration=Release;PublishProfile=Jenkins-DEV;DeployOnBuild=true;VisualStudioVersion=11.0  


      PublishProfile指定创建的Profile名称(没有扩展名)

           DeployOnBuild=true 表示启用编译并发布

           VisualStudioVersion=11.0 表示VS2012

      


    MsBuild 不是可用的命令:
    1、追加Path环境变量:C:WindowsMicrosoft.NETFrameworkv4.0.30319
    2、Jenkins 重起

        http://localhost:8080/restart

    构建:

    C:WindowsMicrosoft.NETFramework64v4.0.30319MSBuild.exe 'E:workspace est.e.womaiapp.comErp.UIErp.UI.WebErp.UI.Web.csproj' /t:Rebuild /p:Configuration=Release /p:WebProjectOutputDir=E:ErpWeb /p:OutputPath=E:ErpWebin /p:VisualStudioVersion=14.0 /p:Platform=x64

    $pw = convertto-securestring -AsPlainText -Force -String P118-J06-2250l.%
    $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "Domainadministrator",$pw
    $session = new-pssession -computername bj25-118 -credential $cred

    cp E:WebWeb.config Z:Web2Web.config

      

  • 相关阅读:
    No Hibernate Session bound to thread, and configuration does not allow
    谈谈数据库中MyISAM与InnoDB区别
    hibernate实体的几种状态:
    解决Eclipse导出javadoc乱码问题
    freemarker截取字符串
    many-to-one和one-to-many的配置比较
    one-to-many many-to-one配置解释
    extends:类似于java中的继承特征,extends="struts-default"
    eclipse 中创建maven web项目
    java.lang.ClassNotFoundException: javax.persistence.EntityListeners
  • 原文地址:https://www.cnblogs.com/simbadan/p/7097478.html
Copyright © 2011-2022 走看看