如何使用命令行将文件部署到 Artifactory? [英] How do I deploy a file to Artifactory using the command line?

查看:33
本文介绍了如何使用命令行将文件部署到 Artifactory?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这方面花费的时间比我愿意承认的要多得多.我正在尝试从命令行将一个文件部署到我的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆