upload file to nexus

52 Views Asked by At

I am trying to upload a file to nexus with jenkinsfile, is there a way to upload a file and overwrite the existing file with newly uploaded so that there will be only 1 file at nexus folder

upload and replace the existing file with new file with nexusArtifactUploader

    nexusArtifactUploader(
    nexusVersion: 'nexus3',
    protocol: 'http',
    nexusUrl: 'my.nexus.address',
    groupId: 'com.example',
    version: version,
    repository: 'RepositoryName',
    credentialsId: 'CredentialsId',
    artifacts: [
        [artifactId: projectName,
         classifier: '',
         file: 'my-service-' + version + '.jar',
         type: 'jar']
    ]
 )

or is it possible to upload and replace through curl command??

0

There are 0 best solutions below