jenkins作业生成不在从属节点中

jenkins作业生成不在从属节点中,jenkins,Jenkins,通过配置在从属计算机中生成作业(生成docker映像,来自github的代码),但它不会生成成功…如果在主计算机中更改作业,则生成成功 从属构建消息: Started by user admin Building remotely on jenkins-slave (slave) in workspace /home/jenkins/workspace/71bnh8co385ctlmoxgbumdnpnet3ywq Cloning the remote Git repository Clonin

通过配置在从属计算机中生成作业(生成docker映像,来自github的代码),但它不会生成成功…如果在主计算机中更改作业,则生成成功

从属构建消息:

Started by user admin
Building remotely on jenkins-slave (slave) in workspace /home/jenkins/workspace/71bnh8co385ctlmoxgbumdnpnet3ywq
Cloning the remote Git repository
Cloning repository git@github.com:xxxxxxx/wcount.git
 > git init /home/jenkins/workspace/71bnh8co385ctlmoxgbumdnpnet3ywq # timeout=10
Fetching upstream changes from git@github.com:xxxxxxx/wcount.git
 > git --version # timeout=10
using GIT_SSH to set credentials 71bnh6gke9kmabye9qu2qsazzpofjsa
 > git -c core.askpass=true fetch --tags --progress     git@github.com:xxxxxxx/wcount.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git@github.com:xxxxxxx/wcount.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url git@github.com:xxxxxxx/wcount.git # timeout=10
Fetching upstream changes from git@github.com:xxxxxxx/wcount.git
using GIT_SSH to set credentials 71bnh6gke9kmabye9qu2qsazzpofjsa
 > git -c core.askpass=true fetch --tags --progress     git@github.com:xxxxxxx/wcount.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 5730301886fa5c02522705de817c5ddac0f0dbce (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 5730301886fa5c02522705de817c5ddac0f0dbce
 > git rev-list 5730301886fa5c02522705de817c5ddac0f0dbce # timeout=10
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: configured dockerFolder     '/home/jenkins/workspace/71bnh8co385ctlmoxgbumdnpnet3ywq' does not exist.
        at     org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:93)
        at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:75)


主工作区是/home/jenkins\u home/workspace

从属工作区是/home/jenkins/workspace

我可以在从属节点中找到/home/jenkins/workspace/71bnh8co385ctlmoxgbumdnpnet3ywq目录。


我猜这个内置主节点,但我在从属队列中看到任务

jenkins docker build step插件不支持在从属节点上运行任务,所以您可以更改一些代码来支持它
将一个jar添加到可以创建映像和推送映像的从属服务器。然后主服务器在从属服务器中调用此jar

jenkins docker build step插件不支持在从属节点上运行任务,因此您可以更改一些代码以支持它
向从机添加一个jar,该jar可以创建映像并推送映像。然后,master在从机中调用此jar

不确定这里是否是这种情况,但Jenkins似乎在构建阶段将Docker build/create任务中Docker文件的路径设置为
$WORKSPACE/Docker
,因此您必须确保拥有该文件夹(包含Dockerfile和其他需要的文件)在您的工作区/git repo中,或者从上面的路径ENV中删除
docker
(imho,这是一个更好的解决方案)Jenkins将从主工作区/git目录中读取Dockerfile。希望这会有所帮助。

不确定这里是否是这种情况,但Jenkins似乎在构建阶段的
Docker build/create
任务中将Dockerfile的路径设置为
$workspace/Docker
,因此您必须确保拥有该文件夹(包含Dockerfile和其他需要的文件)在您的工作区/git repo中,或者从上面的路径ENV中删除
docker
(这是一个更好的解决方案,imho),Jenkins将从主工作区/git目录中读取Dockerfile。希望对您有所帮助