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

      

  • 相关阅读:
    C和指针学习笔记--第五章
    C和指针学习笔记--第四章
    C和指针学习笔记--第三章
    ipables常用命令
    linux网络设计与实现-----第一章
    iptables
    cJSON学习
    Makefile-更新函数库文件
    Makefile隐晦规则
    【Spark学习笔记】01-Spark简介
  • 原文地址:https://www.cnblogs.com/simbadan/p/7097478.html
Copyright © 2011-2022 走看看