我试图创建嵌套目录和作业,使用CloudBees文件夹插件和Jenkins镜像SVN存储库的结构。
对于子目录(假设我已将config.xml复制到CWD):
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo' 很管用。当命令完成时,我在仪表板的顶层有一个新创建的"foo“文件夹。然而,当我尝试:
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo/bar' 我得到一个“错误400:坏请求”。我还尝试将“name=/foo/bar”、"name=%2Ffoo%2Fbar“和"name=foo%2Fbar”替换为"name=/foo/bar",结果相同。
同样,在使用createItem/from/mode/name API复制内部文件夹时,我得到了类似的结果:
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/createItem?name=foo/bar&mode=copy&from=foo'我发现这是非常不寻常的,因为通过web界面,我可以轻松地移动、复制和创建嵌套的目录和作业。
我使用Jenkins 1.569与CloudBees文件夹4.7插件。
发布于 2014-12-04 22:55:29
name可能只是一个简单的名称。您要查找的端点位于文件夹上,而不是根级。因此
wget --no-proxy --auth-no-challenge --http-user=username --ask-password --header="Content-Type: application/xml" --post-file="dconfig.xml" 'http://ci.mycompany.com/jenkins/job/foo/createItem?name=bar'https://stackoverflow.com/questions/27303965
复制相似问题