2016-12-13 14 views
0

こんにちは私はJenkinsとNexusを同じサーバーに持っています。 Jenkinsがプロジェクトを正しく構築すると、Nexus 3に画像をプッシュしたいが、同じ問題が発生するたびに(以下のログ)ドッキング・イメージをNexusにプッシュ

構成: のpom.xml

<nexus.url>http://adress/#browse/browse/components:docker-image</nexus.url> 

<distributionManagement> 
    <snapshotRepository> 
     <id>nexus</id> 
     <url>${nexus.url}</url> 
    </snapshotRepository> 
</distributionManagement> 
... 
<plugins> 
     <plugin> 
      <groupId>org.sonatype.plugins</groupId> 
      <artifactId>nexus-staging-maven-plugin</artifactId> 
      <version>1.6.4</version> 
      <extensions>true</extensions> 
      <configuration> 
       <serverId>nexus</serverId> 
       <nexusUrl>${nexus.url}</nexusUrl> 
       <autoReleaseAfterClose>true</autoReleaseAfterClose> 
      </configuration> 
     </plugin> 

と私は、ファイルのsettings.xmlを持っている:

<servers> 
<server> 
    <id>nexus</id> 
    <username>login</username> 
    <password>password</password> 
</server> 
</servers> 

それから私は "MVNクリーンデプロイ" しようとすると、結果は次のとおりです。

[INFO] Deploying remotely... 
[INFO] Bulk deploying locally gathered artifacts from directory: 
[INFO] * Bulk deploying locally gathered snapshot artifacts to URL http://adress/repository/image-docker/ 
Downloading: http://adress/repository/image-docker/someProject/0.1-SNAPSHOT/maven-metadata.xml 
Uploading: http://adress/repository/image-docker/someProject/0.1-SNAPSHOT/someProject-0.1-20161213.093022-1.jar 
Uploading: http://adress/repository/image-docker/someProject//0.1-SNAPSHOT/someProject-0.1-20161213.093022-1.pom 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 01:58 min 
[INFO] Finished at: 2016-12-13T10:30:35+01:00 
[INFO] Final Memory: 75M/748M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.4:deploy (injected-nexus-deploy) on project someProject: 
Failed to deploy artifacts: Could not transfer artifact someProject:jar:0.1-20161213.093022-1 from/to nexus (http://adress/repository/image-docker/): 
Failed to transfer file: http://adress/repository/image-docker/someProject/someProject/0.1-SNAPSHOT/someProject-0.1-20161213.093022-1.jar. 
Return code is: 502, ReasonPhrase: Bad Gateway. -> [Help 1] 

毎回、502 - Bad Gatewayで同じ問題が発生します。

はあなたには、いくつかの提案を持っていますか?

答えて

2

残念ながら、これはいくつかの理由のために動作しません。

これが役に立ちますようお願いいたします。

+0

1.はい、あなたは正しいです。昨日私はhttp:// adress/repository/image-docker /のURLを変更しましたが、まだ問題があります。 2.プラグインに問題があるかもしれませんが、私はドッカーの画像をメイキングリポジトリのNexusにプッシュします。しかし、大丈夫、私はドッカーのメイヴンプラグインで試してみます。 –

+0

DockerイメージをMavenリポジトリにプッシュできるとは思いません(私は、誰かが間違って私のことを間違って証明すると思います)。 Dockerでホストされたリポジトリを使用して、そうすることができます。 – DarthHater

+0

はい、ここでnexusを使用します:https://www.ivankrizsan.se/2016/06/09/create-a-private-docker-registry/ –

関連する問題