Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38918

nexus-artifact-uploader-plugin does not fail in pipeline on failed upload

    Details

    • Similar Issues:

      Description

      I am trying to upload an nexus artifact in a pipeline:

      node () {
          stage("nexus snapshot checkin") {
              nexusArtifactUploader artifactId: 'my-model',
              classifier: '',
              credentialsId: '<id>',
              file: '<path-to-file>-SNAPSHOT-20.zip',
              groupId: 'org.somegroup',
              nexusUrl: '<nexus-url>',
              nexusVersion: 'nexus3',
              protocol: 'http',
              repository: 'maven-snapshots',
              type: 'zip',
              version: '1.6.7-SNAPSHOT'
          }
      }
      

      In the log output I see:

      Failed to deploy artifacts: Could not transfer artifact<my-artifact> from/to maven-releases (<url>): Failed to transfer <url>. Error code 400, Repository does not allow updating assets: maven-releases
      

      Which is of course a configuration error on the nexus.

      But the job does not fail! In my opinion the plugin should throw an error when it fails.

        Attachments

          Activity

          Hide
          pskumar448 Suresh Kumar added a comment -

          Fixed and Committed to the repository.
          Find the below commit id of the fix submitted.
          https://github.com/jenkinsci/nexus-artifact-uploader-plugin/commit/301e21cccb54930ee03a3d06bb12989d7879fd10

          Will be released as hotfix this weekend.
          Let me know if this is blocker for you, we release this fix as minor release.

          -Suresh

          Show
          pskumar448 Suresh Kumar added a comment - Fixed and Committed to the repository. Find the below commit id of the fix submitted. https://github.com/jenkinsci/nexus-artifact-uploader-plugin/commit/301e21cccb54930ee03a3d06bb12989d7879fd10 Will be released as hotfix this weekend. Let me know if this is blocker for you, we release this fix as minor release. -Suresh
          Hide
          nathanhuesken Nathan Hüsken added a comment -

          Thanks for the fast response.
          If it is released this weekend it is not a blocker for me.

          Show
          nathanhuesken Nathan Hüsken added a comment - Thanks for the fast response. If it is released this weekend it is not a blocker for me.
          Hide
          svscorp Ilia Shakitko added a comment -

          Issue appears again: Jenkins 2.7.4

          Jenkins pipeline code:

           

          nexusArtifactUploader artifacts: [[artifactId: 'my-artifact', classifier: '', file: 'test.zip', type: 'zip']], credentialsId: 'some-credentials-id', groupId: 'some.group.id', nexusUrl: 'nexus-url', nexusVersion: 'nexus2', protocol: 'https', repository: 'Snapshots', version: '1.0.0-SNAPSHOT'

           

           

          Show
          svscorp Ilia Shakitko added a comment - Issue appears again: Jenkins 2.7.4 Jenkins pipeline code:   nexusArtifactUploader artifacts: [ [artifactId: 'my-artifact', classifier: '', file: 'test.zip', type: 'zip'] ], credentialsId: 'some-credentials-id', groupId: 'some.group.id', nexusUrl: 'nexus-url', nexusVersion: 'nexus2', protocol: 'https', repository: 'Snapshots', version: '1.0.0-SNAPSHOT'    
          Hide
          pskumar448 Suresh Kumar added a comment -

          Ilia Shakitko
          Pls share the log of the build.

          -Suresh

          Show
          pskumar448 Suresh Kumar added a comment - Ilia Shakitko Pls share the log of the build. -Suresh

            People

            • Assignee:
              pskumar448 Suresh Kumar
              Reporter:
              nathanhuesken Nathan Hüsken
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: