我在一个文件夹中创建了几个nuget包,我正尝试将其从jenkins发布到Nexus。下面是我的阶段代码:
stage('Publish To Nexus') {
when {
branch 'dev'
}
steps {
parallel (
"Publish Application Packages": {
script {
bat "nuget.exe push \"${PACKAGE_PATH}\\*.nupkg\" ${NEXUS_APIKEY} -Source \"${FEED_URL}\" -Timeout 36000"
}
},
"Publish Upgrader Packages": {
script {
bat "nuget.exe push \"${PACKAGE_PATH_UPGRADER}\\*.nupkg\" ${NEXUS_APIKEY} -Source \"${FEED_URL}\" -Timeout 36000"
}
}
)
}
}
但是,它失败并出现错误(特别是对于大文件大小):
An error occurred while sending the request.
The underlying connection was closed: The connection was closed unexpectedly.
要注意的一点:当我一次手动执行命令时,它可以正常上传。需要帮助,以了解通过jenkins将软件包上传到nexus的更好方法或替代方法。