Batch file 如何从Jenkins运行批处理文件
我试图运行Jenkins的批处理文件,但无法运行。 在预构建步骤中,我输入了要执行的文件,但得到了如下所示的stacktrace。詹金斯无法识别cmd命令 我怎样才能解决这个问题Batch file 如何从Jenkins运行批处理文件,batch-file,jenkins,cmd,Batch File,Jenkins,Cmd,我试图运行Jenkins的批处理文件,但无法运行。 在预构建步骤中,我输入了要执行的文件,但得到了如下所示的stacktrace。詹金斯无法识别cmd命令 我怎样才能解决这个问题 Started by user Jenkins [EnvInject] - Loading node environment variables. Building in workspace /srv/jenkins/workspace/gaa-integratietest-daily > git rev-pa
Started by user Jenkins
[EnvInject] - Loading node environment variables.
Building in workspace /srv/jenkins/workspace/gaa-integratietest-daily
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url ssh://git@poosgitl01.ont.belastingdienst.nl:7999/gaa/gaa_test_milieu.git # timeout=10
Fetching upstream changes from ssh://git@poosgitl01.ont.belastingdienst.nl:7999/gaa/gaa_test_milieu.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress ssh://git@poosgitl01.ont.belastingdienst.nl:7999/gaa/gaa_test_milieu.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse origin/develop^{commit} # timeout=10
Checking out Revision 337d5b94e05f2c915e05de2c2535d5af180d4326 (origin/develop)
> git config core.sparsecheckout # timeout=10
> git checkout -f 337d5b94e05f2c915e05de2c2535d5af180d4326
> git rev-list 337d5b94e05f2c915e05de2c2535d5af180d4326 # timeout=10
[gaa-integratietest-daily] $ /bin/sh -xe /tmp/hudson1965771098535657790.sh
+ cmd /c qclient.bat
/tmp/hudson1965771098535657790.sh: line 2: cmd: command not found
Build step 'Execute shell' marked build as failure
[gaa-integratietest-daily] $ /usr/share/maven/bin/mvn -f pom.xml -gs /srv/maven/settings.xml clean deploy -fae
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (/srv/jenkins/workspace/gaa-integratietest-daily/pom.xml) has 1 error
[ERROR] Non-readable POM /srv/jenkins/workspace/gaa-integratietest-daily/pom.xml: /srv/jenkins/workspace/gaa-integratietest-daily/pom.xml (No such file or directory)
[ERROR]
您正在尝试在LINUX计算机上运行CMD。将正在运行的从机更改为Windows计算机,或将批处理脚本迁移为shell脚本
祝你好运 您正在尝试在LINUX计算机上运行CMD。将正在运行的从机更改为Windows计算机,或将批处理脚本迁移为shell脚本
祝你好运 您的Linux Jenkins slave不支持cmd。为了解决这个问题,您有几种选择(从好到坏):
我的建议:如果你知道Linux和Bash,或者你无法控制Jenkins那么选择选项2。否则,选择选项1。避免选项3。您的Linux Jenkins slave不支持cmd。为了解决这个问题,您有几种选择(从好到坏):