如何使用命令行将文件部署到Artifactory? [英] How do I deploy a file to Artifactory using the command line?
问题描述
我花了更多的时间在此方面,而不是我愿意承认的.我试图从命令行将一个文件部署到Artifactory服务器中.我正在使用gradle进行此操作,因为这是我们管理Java构建的方式.但是,此工件是NDK/JNI构建工件,并且不使用gradle.
I've spent far more time on this than I care to admit. I am trying to just deploy one file into my Artifactory server from the command line. I'm doing this using gradle because that is how we manage our java builds. However, this artifact is an NDK/JNI build artifact, and does not use gradle.
因此,我只需要最简单的gradle脚本即可进行部署.等同于:
So I just need the simplest gradle script to do the deploy. Something equivalent to:
scp <file> <remote>
我目前正在尝试使用artifactory
插件,而在查找该插件的引用方面运气不佳.
I am currently trying to use the artifactory
plugin, and am having little luck in locating a reference for the plugin.
推荐答案
curl POST对我不起作用. PUT正常工作.用法是
curl POST did not work for me . PUT worked correctly . The usage is
curl -X PUT $SERVER/$PATH/$FILE --data-binary @localfile
示例:
$ curl -v --user username:password --data-binary @local-file -X PUT "http://<artifactory server >/artifactory/abc-snapshot-local/remotepath/remotefile"
这篇关于如何使用命令行将文件部署到Artifactory?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!