我有一个gulp build
,它在war
目录中创建了一个build
文件。
是否有Jenkins管道将这个war
文件直接发布到Artifactory。
请注意,我正在为詹金斯使用声明性管道
答案 0 :(得分:0)
Jenkins的JFrog Artifactory plugin支持declarative pipelines。
您可以使用rtUpload命令将文件上传到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'
)