Push it out

This commit is contained in:
Jim Nicholson 2024-02-26 14:54:55 -08:00
parent 77735a9cb3
commit 4821d4ecf6

View File

@ -1,18 +1,16 @@
void call(Map config = [:], String packageName) { void call(Map config = [:], String packageName) {
publishURL = [ config.nexusBase, config.nexusRepository, config.nexusRepoPath, packageName ].join('/') publishURL = [ config.nexusBase, config.nexusRepository, config.nexusRepoPath, packageName ].join('/')
echo "Info: ${publishURL}"
withCredentials([usernameColonPassword(credentialsId: 'publisher', variable: 'NEXUS_PUBLISH')]) { echo 'Info: Publishing...'
response = httpRequest httpMode: 'POST', echo "Info: ${publishURL}"
response = httpRequest httpMode: 'POST',
authenticate: 'publisher',
consoleLogResponseBody: true,
contentType: 'multipart/form-data', contentType: 'multipart/form-data',
url: publishURL, url: publishURL,
wrapAsMultipart: true, wrapAsMultipart: true,
customHeaders: [
[name: 'Authorization', value: 'Basic ' + "${env.NEXUS_PUBLISH}".bytes.encodeBase64()]
],
requestBody: [$class: 'FileRequestBody', file: packageName] requestBody: [$class: 'FileRequestBody', file: packageName]
echo "Response: ${response.content}" echo "Response: ${response.content}"
}
} }