Artifactory에 XML 파일을 업로드하려면 RESTCLIENT를 사용할 때 파일의 조기 종료
-
09-12-2019 - |
문제
전개 API 호출.
def restClient = new RESTClient('http://localhost:8080/artifactory/libs-release-local/')
restClient.auth.basic 'username', 'password'
def response = restClient.put(path: 'org/artifact/1.0/awesome.xml',
body: "<xml>xml content goes here</xml>",
requestContentType: 'application/xml'
)
.
파일이 아티팩트에 미세하게 업로드하지만 아래에서 응답을 얻을 수 있습니다.이것은 큰 거래가되지는 않을 것이지만, 모든 것이 올바르게 업로드 된 것으로 보이지만 젠킨스 빌드가 실패하기 때문에 실패하기 때문입니다.
해결책
이것은 트릭을하는 것처럼 보입니다.RESTCLIENT에 버그가있을 수 있습니까?
def http = new HTTPBuilder("http://localhost:8080/artifactory/libs-release-local/org/artifact/1.0/awesome.xml")
http.auth.basic 'username', 'password'
http.request(PUT, TEXT ) { req ->
body = "<xml>xml content goes here</xml>"
}
. 제휴하지 않습니다 StackOverflow