Nexus NPM储存库

时间:2019-12-20 09:41:10

标签: jenkins npm jenkins-pipeline bitbucket nexus

是否可以上传NPM类型的Nexus Repository中的“ .zip”文件?

nexusArtifactUploader工件:[[artifactId:'spring-petclinic',分类:',文件:'target / 9.0.0-rc1.zip',类型:'zip']],凭据ID:'ff154118-e8d1- 4c40-a63b-5ce5821c347c',groupId:'Pet_Clinic',nexusUrl:'uat.alm.com/nexus'、nexusVersion:'nexus3',协议:'https',存储库:'NexusTest1_Release',版本:'1.0.0.0'

出现此错误: enter image description here

1 个答案:

答案 0 :(得分:0)

看着:https://jenkins.io/doc/pipeline/steps/nexus-artifact-uploader/看起来可以。我认为您只需要添加'type:'zip'

如果您需要我自己的管道,请使用nexusArtifactuploader(用于tgz存档):

withCredentials([usernamePassword(credentialsId: 'nexusId', usernameVariable: 'nexusUser', passwordVariable: 'nexusPwd')]) {
    nexusArtifactUploader(
        nexusVersion: 'nexus3',
        protocol: 'https',
        nexusUrl: 'myNexusUrl',
        groupId: 'mygroupId',
        version: tagG,
        repository: 'myRepo',
        credentialsId: 'nexusId',
        artifacts: [
            [artifactId: 'myArchive',
            type:'tgz',
            classifier: '',
            file: "myArchive-${tagG}.tgz"]
        ]
    )
}