In Scripted Pipeline (pulling Jenkinsfile from SCM) approach, how do we publish artifacts to Artifactory
?
After installing Artifactory plugin in Jenkins, the below code snippet did the trick for me.
rtUpload (serverId: "server-id",
failNoOp: true,
spec:
"""{
"files": [
{
"pattern": "build/libs/*.jar",
"target": "libs-release"
}
]
}"""
)