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

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

    XMLWordPrintable

Details

    • 2.14

    Description

      I am trying to upload a

      nexus artefact 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

          divyank Divyank added a comment -

          Facing same issue, while uploading snapshot jar to nexus release repo. When i try to upload snapshot jar to nexus release repo, it show failed to upload, ideally pipeline should also fail, but it shows build successful.

          If anyone found any workaround to resolve this. Please let me know.

           
          Failed to deploy artifacts: Could not find artifact com.cable:core:jar:8.6.1-20210526.125338-1 in snapshot (https://nexus.in-eon.com/repository/snapshot)
          Finished: SUCCESS

          divyank Divyank added a comment - Facing same issue, while uploading snapshot jar to nexus release repo. When i try to upload snapshot jar to nexus release repo, it show failed to upload, ideally pipeline should also fail, but it shows build successful. If anyone found any workaround to resolve this. Please let me know.   Failed to deploy artifacts: Could not find artifact com.cable:core:jar:8.6.1-20210526.125338-1 in snapshot ( https://nexus.in-eon.com/repository/snapshot ) Finished: SUCCESS

          Hi pskumar448 divyank,
          I created PR that fix that issue for all cases. tested on our jenkins.
          https://github.com/jenkinsci/nexus-artifact-uploader-plugin/pull/23

          igreenfield Izek Greenfield added a comment - Hi  pskumar448 divyank , I created PR that fix that issue for all cases. tested on our jenkins. https://github.com/jenkinsci/nexus-artifact-uploader-plugin/pull/23

          This got merged, but no release created for it yet.  Can it be released?

          jbennett20912 Jeffrey Bennett added a comment - This got merged, but no release created for it yet.  Can it be released?

          Can it be released?

          mondeveloper Marco Monducci added a comment - Can it be released?
          basil Basil Crow added a comment - Fixed in jenkinsci/nexus-artifact-uploader-plugin#23 . Released in 2.14 .

          People

            pskumar448 Suresh Kumar
            nathanhuesken Nathan Hüsken
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: