Artifactory创建文件夹而不是部署工件

时间:2015-06-04 00:33:20

标签: jenkins jenkins-plugins artifactory jenkins-cli

我有一个从artifactory jenkins插件派生的插件,它将工件部署为artifactory。几天前,当我遇到一个奇怪的问题时,它工作得很好:我将我的工件部署到一个布局,并且插件部署得很好但是在布局的叶级而不是部署工件它使它成为一个空夹。

我进入日志并看到以下内容:

 (o.a.e.UploadServiceImpl:273) - MKDir request to 'yum-snapshot-local:rhel5/i386/packages//-1.12.13-d.34.i386.rpm'
    2015-06-04 00:00:10,219 [http-bio-8081-exec-1339] [INFO ] (o.a.e.UploadServiceImpl:279) - Directory 'yum-snapshot-local:rhel5/i386/packages//-1.12.13-d.34.i386.rpm' was created successfully.
    2015-06-04 00:00:11,326 [http-bio-8081-exec-1366] [INFO ] (o.a.r.r.c.BuildResource:286) - Adding build 'test #34'
    2015-06-04 00:00:11,550 [http-bio-8081-exec-1366] [INFO ] (o.a.r.r.c.BuildResource:303) - Added build 'test #34'

正如你所看到的那样,插件正在制作mkdir请求而不是部署,这就是为什么创建空目录,但这只是2.2.7 artifactory jenkins插件的一个分支。

我使用旧版本的插件,似乎部署得很好,日志显示:

2015-06-03 23:48:00,458 [http-bio-8081-exec-1339] [INFO ] (o.a.e.UploadServiceImpl:479) - Deploy to 'libs-snapshot-
    local:djin/platforn/cande/FreeBSD/i386/packages/something/something-1.12.13-d.20.i386.rpm' Content-Length: 51

为什么它应该突然进行mkdir rquest?我在哪里可以找到这个" o.a.e.UploadServiceImpl"文件?

编辑1.0

非常感谢,看起来问题就在这里:

private void adjustResponseAndUpload(ArtifactoryRequest request, ArtifactoryResponse response,
            LocalRepo targetRepository) throws IOException {
        if (processOriginatedExternally(response)) {
            response = new DelayedHttpResponse((HttpArtifactoryResponse) response);
        }
        try {
            if (request.isDirectoryRequest()) {
                createDirectory(request, response);
            } else if (request.isChecksum()) {
                validateAndUploadChecksum(request, response, targetRepository);
            } else if (NamingUtils.isMetadata(request.getPath())) {
                response.sendError(SC_CONFLICT, "Old metadata notation is not supported anymore: " +
                        request.getRepoPath(), log);
            } else {
                uploadArtifact(request, response, targetRepository);
            }

if(request.isDirectoryRequest())由于某种原因返回true,因此将其作为文件夹处理,但出于什么原因?

0 个答案:

没有答案