nexus-artifact-uploader-plugin reports file uploaded to nexus when no file has been uploaded

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Sample pipeline job to test uploading a file to a "raw" repository in nexus3:

      pipeline {
          agent {
              label "<something>"
          }
          stages {
              stage("Upload") {
                  steps {
                      sh label: '', script: 'echo "hello world" > jenkins-artifact.txt'
                      archiveArtifacts 'jenkins-artifact.txt'
                      nexusArtifactUploader artifacts: [[artifactId: 'nexus-artifact-uploader', classifier: '', file: 'jenkins-artifact.txt', type: 'txt']], credentialsId: 'jenkins-nexus-upload', groupId: 'customer.test1', nexusUrl: '<nexus URI>', nexusVersion: 'nexus3', protocol: 'https', repository: 'test-customer', version: '0.4'
                  }
              }
          }
      }
      

      Console log shows:

      [Pipeline] archiveArtifacts
      Archiving artifacts
      [Pipeline] nexusArtifactUploader
      Uploading artifact jenkins-artifact.txt started....
      GroupId: customer.test1
      ArtifactId: customer.test1
      Classifier: 
      Type: txt
      Version: 0.4
      File: jenkins-artifact.txt
      Repository:test-customer
      Uploading: https://<nexus URI>/repository/test-customer/customer/test1/nexus-artifact-uploader/0.4/nexus-artifact-uploader-0.4.txt
      [Pipeline] }

      However there is no file available in nexus in the `test-customer` repository.

       

      The user specified in the jenkins credentials has the privileges:

      • nx-component-upload
      • nx-repository-view-raw-test-customer-add
      • nx-repository-view-raw-test-customer-browse

      Using the web UI the user has the option to upload files.

       

      What else is needed to be able to publish artifacts to nexus3?

            Assignee:
            Suresh Kumar
            Reporter:
            Bram Mertens
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: