2014-12-04 3 views
1

CloudBees 폴더 플러그인 및 Jenkins 원격 API를 사용하여 내 SVN 저장소의 구조를 미러링하는 중첩 된 디렉토리 및 작업을 만들려고합니다. 하위 디렉토리에 대한 CloudBees 폴더 플러그인과 함께 createItem 원격 API를 사용하여 중첩 된 작업 또는 하위 디렉토리 만들기

(나는 내 ​​CWD에 config.xml 파일을 복사 한 가정) :

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' 

"ERROR 400 : Bad Request"가 표시됩니다. 또한 "name =/foo/bar", "name = % 2Ffoo % 2Fbar"및 "name = foo % 2Fbar"를 모두 동일한 결과로 대체하려고 시도했습니다.// 모드/이름 API에서 내부 폴더를 복사 할 createItem를 사용하는 경우 마찬가지로

, 나는 비슷한 결과를 얻을 : 이후

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' 

내가 발견이 매우 이례적인 - 웹 인터페이스를 통해 - 내가 쉽게 이동할 수 있습니다 복사, 중첩 된 디렉토리 및 작업 작성.

Jenkins 1.569를 CloudBees Folders 4.7 플러그인과 함께 사용하고 있습니다.

답변

4

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'