-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins ver. 2.205
nexus artifact updater plugin version 2.13
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?