2017-04-24 71 views

回答

0

是的,这是可能的。我从jenkins中每个管道作业的左侧导航栏中的“Pipeline Syntax”链接中生成了以下步骤。样本步骤是“Checkout:General SCM”,SCM是“Subversion”,从那里您可以选择“总是检查新鲜副本”的“检出策略”。

checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: '196ff1ff-c481-4d2e-922b-e32410f8ee13', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: 'https://mycompany.example.com/svn/MYREPO/crs/trunk']], workspaceUpdater: [$class: 'CheckoutUpdater']]) 

的关键部分是:

workspaceUpdater: [$class: 'CheckoutUpdater'] 

如果你不熟悉声明你的工作将如何建立使用Jenkinsfile但(管道功能),检查https://jenkins.io/doc/book/pipeline/。下面是“管道语法”链接是什么样子的资产净值:

Screenshot showing link to Pipeline syntax

+0

谢谢你的回应凯文,我可以以任何机会得到截图请。我无法真正得到“管道语法”。 –

+0

我添加了一个截图! – burnettk

+0

嗨凯文,这是我的詹金斯http://i.imgur.com/foD3KC4.png的截图,看来我没有这个管道。 –