Jenkins 上传神器到 Nexus 插件不与 Nexus 3 一起工作
Jenkins upload artifact to nexus plugin not working with Nexus 3
我有一个 Jenkins 项目,它执行 gradle 构建并使用 Jenkins 上传工件到 nexus 插件将构建工件上传到 Nexus maven 托管存储库。这在我使用 Nexus 2.13 时工作正常 - 但在升级到 Nexus 3 后,上传到 Nexus 不再有效。我已经确定我已经配置了 Nexus 3 存储库,就像我的 Nexus 2.13 存储库一样。当我构建我的 Jenkins 项目时,我得到了响应
GroupId: com.company
ArtifactId: hello-world-util
Version: 1.0.0
File: hello-world-util-1.0.0.jar
Repository:companyDevops
Uploading artifact hello-world-util-1.0.0.jar started....
Reason Phrase: Method Not Allowed
<!DOCTYPE html>
<html>
<head>
<title>405 - Nexus Repository Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 9]>
<script>(new Image).src="http://192.168.99.100:18081/favicon.ico?3.0.1-01"</script>
<![endif]-->
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-32x32.png?3.0.1-01" sizes="32x32">
<link rel="mask-icon" href="http://192.168.99.100:18081/safari-pinned-tab.svg?3.0.1-01" color="#5bbad5">
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-16x16.png?3.0.1-01" sizes="16x16">
<link rel="shortcut icon" href="http://192.168.99.100:18081/favicon.ico?3.0.1-01">
<meta name="msapplication-TileImage" content="http://192.168.99.100:18081/mstile-144x144.png?3.0.1-01">
<meta name="msapplication-TileColor" content="#00a300">
<link rel="stylesheet" type="text/css" href="http://192.168.99.100:18081/static/css/nexus-content.css?3.0.1-01"/>
</head>
<body>
<div class="nexus-header">
<a href="http://192.168.99.100:18081">
<div class="product-logo">
<img src="http://192.168.99.100:18081/static/images/nexus.png?3.0.1-01"/>
</div>
<div class="product-id">
<div class="product-id__line-1">
<span class="product-name">Nexus Repository Manager</span>
</div>
<div class="product-id__line-2">
<span class="product-spec">OSS 3.0.1-01</span>
</div>
</div>
</a>
</div>
<div class="nexus-body">
<div class="content-header">
<img src="http://192.168.99.100:18081/static/rapture/resources/icons/x32/exclamation.png?3.0.1-01"/>
<span class="title">Error 405</span>
<span class="description">Method Not Allowed</span>
</div>
<div class="content-body">
<div class="content-section">
HTTP method POST is not supported by this URL
</div>
</div>
</div>
</body>
</html>
我的 Jenkins nexus 上传配置如下(这在 Nexus 2.13 和 3 之间没有改变)
Upload artifact to nexus
Nexus Details
Protocol HTTP
Nexus URL 192.168.99.100:18081
User admin
Password admin123
Credentials com.company
GroupId com.company
ArtifactId hello-world-ui
Version 1.0.0
Packaging jar
Repository companyDevops
File build/libs/hello-world-util-1.0.0.jar
我的 Nexus 3 maven 托管存储库配置如下
Name companyDevops
Format maven2
Type hosted
URL http://192.168.99.100:18081/repository/companyDevops/
Online
Maven 2
Version policy Release
Layout policy Strict
Storage
Blog store default
Strict content type validation X
Hosted
Deployment policy Allow redeploy
不确定为什么会出现此错误
-我已验证 Nexus 管理员用户有权上传工件
-我已经验证允许重新部署已启用
可能会发生什么
- 可能 Jenkins 的“将工件上传到 nexus”插件与 Nexus 3 不兼容?
有没有人知道这个可以与 Nexus 3 一起使用?有什么建议吗?
谢谢!
此插件不支持 Nexus-3.x,我们正在努力提供将工件上传到 Nexus-3.x
的功能
Nexus Artifact Uploader 插件现在支持 Nexus-2.x 和 Nexus-3.x。
支持带有插件版本 2.6 的 Nexus-3.x
https://wiki.jenkins-ci.org/display/JENKINS/Nexus+Artifact+Uploader
请使用"Nexus Artifact Uploader",下面是url,也支持nexus 3。
https://plugins.jenkins.io/nexus-artifact-uploader
插件安装完成后,我们会在build部分得到nexus artifact uploader
我有一个 Jenkins 项目,它执行 gradle 构建并使用 Jenkins 上传工件到 nexus 插件将构建工件上传到 Nexus maven 托管存储库。这在我使用 Nexus 2.13 时工作正常 - 但在升级到 Nexus 3 后,上传到 Nexus 不再有效。我已经确定我已经配置了 Nexus 3 存储库,就像我的 Nexus 2.13 存储库一样。当我构建我的 Jenkins 项目时,我得到了响应
GroupId: com.company
ArtifactId: hello-world-util
Version: 1.0.0
File: hello-world-util-1.0.0.jar
Repository:companyDevops
Uploading artifact hello-world-util-1.0.0.jar started....
Reason Phrase: Method Not Allowed
<!DOCTYPE html>
<html>
<head>
<title>405 - Nexus Repository Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 9]>
<script>(new Image).src="http://192.168.99.100:18081/favicon.ico?3.0.1-01"</script>
<![endif]-->
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-32x32.png?3.0.1-01" sizes="32x32">
<link rel="mask-icon" href="http://192.168.99.100:18081/safari-pinned-tab.svg?3.0.1-01" color="#5bbad5">
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-16x16.png?3.0.1-01" sizes="16x16">
<link rel="shortcut icon" href="http://192.168.99.100:18081/favicon.ico?3.0.1-01">
<meta name="msapplication-TileImage" content="http://192.168.99.100:18081/mstile-144x144.png?3.0.1-01">
<meta name="msapplication-TileColor" content="#00a300">
<link rel="stylesheet" type="text/css" href="http://192.168.99.100:18081/static/css/nexus-content.css?3.0.1-01"/>
</head>
<body>
<div class="nexus-header">
<a href="http://192.168.99.100:18081">
<div class="product-logo">
<img src="http://192.168.99.100:18081/static/images/nexus.png?3.0.1-01"/>
</div>
<div class="product-id">
<div class="product-id__line-1">
<span class="product-name">Nexus Repository Manager</span>
</div>
<div class="product-id__line-2">
<span class="product-spec">OSS 3.0.1-01</span>
</div>
</div>
</a>
</div>
<div class="nexus-body">
<div class="content-header">
<img src="http://192.168.99.100:18081/static/rapture/resources/icons/x32/exclamation.png?3.0.1-01"/>
<span class="title">Error 405</span>
<span class="description">Method Not Allowed</span>
</div>
<div class="content-body">
<div class="content-section">
HTTP method POST is not supported by this URL
</div>
</div>
</div>
</body>
</html>
我的 Jenkins nexus 上传配置如下(这在 Nexus 2.13 和 3 之间没有改变)
Upload artifact to nexus
Nexus Details
Protocol HTTP
Nexus URL 192.168.99.100:18081
User admin
Password admin123
Credentials com.company
GroupId com.company
ArtifactId hello-world-ui
Version 1.0.0
Packaging jar
Repository companyDevops
File build/libs/hello-world-util-1.0.0.jar
我的 Nexus 3 maven 托管存储库配置如下
Name companyDevops
Format maven2
Type hosted
URL http://192.168.99.100:18081/repository/companyDevops/
Online
Maven 2
Version policy Release
Layout policy Strict
Storage
Blog store default
Strict content type validation X
Hosted
Deployment policy Allow redeploy
不确定为什么会出现此错误 -我已验证 Nexus 管理员用户有权上传工件 -我已经验证允许重新部署已启用
可能会发生什么 - 可能 Jenkins 的“将工件上传到 nexus”插件与 Nexus 3 不兼容?
有没有人知道这个可以与 Nexus 3 一起使用?有什么建议吗?
谢谢!
此插件不支持 Nexus-3.x,我们正在努力提供将工件上传到 Nexus-3.x
的功能Nexus Artifact Uploader 插件现在支持 Nexus-2.x 和 Nexus-3.x。 支持带有插件版本 2.6 的 Nexus-3.x https://wiki.jenkins-ci.org/display/JENKINS/Nexus+Artifact+Uploader
请使用"Nexus Artifact Uploader",下面是url,也支持nexus 3。
https://plugins.jenkins.io/nexus-artifact-uploader
插件安装完成后,我们会在build部分得到nexus artifact uploader