English 中文(简体)
如何在Jenkins 制作建材前的脚本 来跳过这工作 让它成功?
原标题:How to make pre-build step script in Jenkins to skip the job and make it SUCCESS?

我想在詹金斯的工作里 做一个预建步骤的贝壳/珀尔, 并且根据一些条件, 我想让它跳过剩下的工作, 但还是能让它成功。有办法这样做吗?

谢谢你抽出时间

最佳回答

我用一个系统Groovy脚本的建设步骤运行,通过 rel=“nofollow”>Groovy插件 运行:

def thr = Thread.currentThread()
def thisBuild = thr?.executable

thisBuild.setResult(hudson.model.Result.SUCCESS)
thisBuild.executor.interrupt(hudson.model.Result.SUCCESS)

警告: 有些插件( 最明显的是运行条件插件) 不优雅地处理被中断的构建( 虽然根据我的理解, 它们必须如此), 如果在代码之后运行属于它们的建设步骤, 将会失败 。

问题回答

暂无回答




相关问题
Configure hudson to build multiple branches

I use an ant file to build a java project in mercurial through hudson. The mailnine has a hudson job running just fine. Recently a new branch was created and pushed to the server by commnd line: hg ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using Hudson and build steps with multiple git repositories

I m trying out Hudson to replace our current Buildbot setup. I installed the git plugin. Our current setup is like: ssh://server:/repo/test_framework.git ssh://server:/repo/project_a.git Now, to ...

use hudson to get remote tests results

I ve a server running a proprietary language on which I m able to run "unit tests" in this language. I cannot install a Hudson slave on this machine, but would like to have these tests results ...

Where do I see the shell script output in Hudson

I have written a shell script to build my project using hudson. I have put some comments that will be displayed on the console by using echo command. This will help me to debug the scripts if there ...

Why am I getting handshake_failure with Java SSL cert?

I m trying to use Hudson (which uses SVNKit) to access a Subversion repository that requires a client certificate to access it. I can access the same repository using the same client certificate via ...

热门标签