I have a gulp build
which creates a war
file in build
directory.
Is there a Jenkins pipeline to publish this war
file directly to Artifactory.
Note that I am using a declarative pipeline for Jenkins
The JFrog Artifactory plugin for Jenkins has support for declarative pipelines .
You can use the rtUpload command for uploading files to Artyifactory
rtUpload (
serverId: 'Artifactory-1',
spec: '''{
"files": [
{
"pattern": "build/war/*.war",
"target": "my-repo/my-path/"
}
]
}''',
// Optional - Associate the uploaded files with the following custom build name and build number,
// as build artifacts.
// If not set, the files will be associated with the default build name and build number (i.e the
// the Jenkins job name and number).
buildName: 'my-build',
buildNumber: '42'
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.