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

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

    • 2.14

      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.

          [JENKINS-38918] nexus-artifact-uploader-plugin does not fail in pipeline on failed upload

          Nathan Hüsken created issue -
          Nathan Hüsken made changes -
          Description Original: 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.
          New: I am trying to upload an nexus artifact in a pipeline:

          {code:groovy}
          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'
              }
          }
          {code}


          In the log output I see:

          {code}
          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
          {code}

          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.
          Nathan Hüsken made changes -
          Description Original: I am trying to upload an nexus artifact in a pipeline:

          {code:groovy}
          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'
              }
          }
          {code}


          In the log output I see:

          {code}
          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
          {code}

          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.
          New: I am trying to upload an nexus artifact in a pipeline:

          {code}
          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'
              }
          }
          {code}


          In the log output I see:

          {code}
          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
          {code}

          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.
          Suresh Kumar made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Ilia Shakitko made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Naveen Boni made changes -
          Description Original: I am trying to upload an nexus artifact in a pipeline:

          {code}
          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'
              }
          }
          {code}


          In the log output I see:

          {code}
          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
          {code}

          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.
          New: I am trying to upload a

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          nexus artefact in a pipeline:
          {code:java}
          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'
              }
          }
          {code}
          In the log output I see:
          {code:java}
          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
          {code}
          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.
          Izek Greenfield made changes -
          Description Original: I am trying to upload a

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          nexus artefact in a pipeline:
          {code:java}
          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'
              }
          }
          {code}
          In the log output I see:
          {code:java}
          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
          {code}
          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.
          New: I am trying to upload a

          nexus artefact in a pipeline:
          {code:java}
          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'
              }
          }
          {code}
          In the log output I see:
          {code:java}
          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
          {code}
          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.
          Basil Crow made changes -
          Released As New: 2.14
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: