使用多分支工作流程清理构建 [英] Clean builds with Multibranch Workflow

查看:115
本文介绍了使用多分支工作流程清理构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用多分支工作流,检出命令如下所示

Using Multibranch Workflow, the command to check out looks like

checkout scm

我找不到告诉Jenkins执行干净结帐的方法. 干净"是指它应从工作区中删除所有不受版本控制的文件.

I can't find a way to tell Jenkins to perform a clean checkout. By "clean," I mean it should remove all files from the workspace that aren't under version control.

推荐答案

我不确定这是否能回答原始问题(我无法确定是否打算将一些文件留在工作空间中),但是为什么不只是先删除工作区,还可以进行干净签出:

I'm not sure if this answers the original question or not (I couldn't tell if the intention was to leave some files in the workspace) but why not just remove the workspace first, this would allow a clean checkout:

stage ('Clean') {
    deleteDir()
}

stage ('Checkout') {
    checkout scm 
}

这篇关于使用多分支工作流程清理构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆