在詹金斯中执行批处理文件 [英] Executing Batch File in Jenkins

查看:387
本文介绍了在詹金斯中执行批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的批处理文件.我要从詹金斯调用/运行/执行该文件.

I have a simple batch file. I want to call/run/execute that file from Jenkins.

Jenkins中是否有相同的插件?

Is there are plugin in Jenkins for the same ?

如何从Jenkins执行批处理文件? 如果有相同的任何教程或文档.

How can execute the batch file from Jenkins ? If there is any tutorial or documentation for the same.

推荐答案

在Linux上,转到jenkins作业,转到配置,添加构建步骤"execute shell",然后键入脚本名称. 请确保您的文件是可执行文件(chmod 777 yourscript.sh),并且在正确的位置(通过GIT或SVN检出,请检查您的作业工作空间,当前执行的目录是作业目录,作业工作空间的基础),并具有有效的shebang(脚本文件的第一行,例如#!/bin/sh).

On Linux, go to your jenkins job, go to configuration, add build step "execute shell", then type the name of your script. Please be sure that your file is executable (chmod 777 yourscript.sh) and in the right place (checkout via GIT or SVN, please check your job workspace, your current dir for execute is the job dir, base of job workspace) and to have a valid shebang (first line in your script file e.g. #!/bin/sh).

这篇关于在詹金斯中执行批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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