jenkins部署经验分享

作者:

在

1.内网安装插件

<?
xml version
='1.0' encoding
='UTF-8'?>
<
project
>
  <
actions
/>
  <
description
></
description
>
  <
keepDependencies
>false</
keepDependencies
>
  <
properties
/>
  <
scm class
="hudson.plugins.tfs.TeamFoundationServerScm" plugin
="tfs@3.1.1"
>
    <
serverUrl
>http://xxxx.xxxx.xxx.xxx:xxxx/tfs/DefaultCollection</
serverUrl
>
    <
projectPath
>$/xxxx.Web</
projectPath
>
    <
localPath
>.</
localPath
>
    <
workspaceName
>Hudson-${JOB_NAME}-${NODE_NAME}</
workspaceName
>
    <
userPassword
>cGFzczAxIQ==</
userPassword
>
    <
userName
>xxxx\dq</
userName
>
    <
useUpdate
>true</
useUpdate
>
  </
scm
>
  <
canRoam
>true</
canRoam
>
  <
disabled
>false</
disabled
>
  <
blockBuildWhenDownstreamBuilding
>false</
blockBuildWhenDownstreamBuilding
>
  <
blockBuildWhenUpstreamBuilding
>false</
blockBuildWhenUpstreamBuilding
>
  <
triggers
/>
  <
concurrentBuild
>false</
concurrentBuild
>
  <
builders
>
    <
hudson.plugins.msbuild.MsBuildBuilder plugin="msbuild@1.23">
      <
msBuildName
>(Default)</
msBuildName
>
      <
msBuildFile
>IFund.Web.sln</
msBuildFile
>
      <
cmdLineArgs
>/p:Configuration=Sharepoint /p:VisualStudioVersion=12.0 /p:DeployOnBuild=true /p:PublishProfile="C:\Program Files (x86)\Jenkins\workspace\xxx.Web\Properties\PublishProfiles\Jenkins.AutoDeploy.pubxml"
</
cmdLineArgs
>
      <
buildVariablesAsProperties
>false</
buildVariablesAsProperties
>
      <
continueOnBuildFailure
>false</
continueOnBuildFailure
>
      <
unstableIfWarnings
>false</
unstableIfWarnings
>
    </
hudson.plugins.msbuild.MsBuildBuilder
>
    <
hudson.tasks.BatchFile
>
      <
command
>xcopy /E /C /Y "C:\Jenkins\Web" "C:\target"
xcopy /E /C /Y "C:\Jenkins\workflow" "C:\target\workflow\"
</
command
>
    </
hudson.tasks.BatchFile
>
  </
builders
>
  <
publishers
/>
  <
buildWrappers
/>
</
project
>

6.参考文章

http://nakedalm.com/configuring-jenkins-talk-tfs-2013/

http://www.ganshani.com/blog/2014/03/build-automation-using-jenkins-and-tfs-repository/ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

如遇到问题,可以查看日志

评论

发表回复