[英]How can I transfer files from a remote Linux server to artifactory
How can I write a script in Jenkins ( have a linux node) that will allow me to transfer a file, for eg sample.txt which is present in the remote linux server to the artifactory ( Jfrog).如何在 Jenkins(有一个 linux 节点)中编写一个脚本,该脚本将允许我传输文件,例如远程 linux 服务器到 artifactory 中的sample.txt 。
I am new to the whole SFTP from CLI since usually, I have done through the WinSCP UI and that too from my local to a remote server, so any pointers on where to get started will be helpful as well我是来自 CLI 的整个 SFTP 的新手,因为通常我已经通过 WinSCP UI 完成了,而且从我的本地服务器到远程服务器也是如此,所以任何关于从哪里开始的指针也会有所帮助
As you are looking to deploy artifacts only through the Jenkins job, then you can use the DeployArtifact REST API, create a UNIX script based on your requirement, and then execute the same through the Execute shell option from the Jenkins job. As you are looking to deploy artifacts only through the Jenkins job, then you can use the DeployArtifact REST API, create a UNIX script based on your requirement, and then execute the same through the Execute shell option from the Jenkins job.
As a side note, if you are looking to deploy the artifacts that exists on the Jenkins VM to the Artifactory repository, then you can make use of the rtUpload method.附带说明一下,如果您希望将 Jenkins VM 上存在的工件部署到 Artifactory 存储库,那么您可以使用rtUpload方法。 You can refer to the JFrog wiki page here for more details with an example on the same.
您可以在此处参考 JFrog wiki 页面以获取更多详细信息以及相同的示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.