简体   繁体   English

无论如何使用Hudson将.war或.jar从一台服务器转移到另一台服务器?

[英]Is there anyway to transfer .war or .jar from one server to another with Hudson?

I am using Hudson and wondering if is there anyway to transfer one file(this file is on a Linux Server)to another linux server. 我正在使用Hudson并想知道是否还有将一个文件(此文件在Linux服务器上)传输到另一个Linux服务器。

Maybe use scp command from linux, just wanna know if somebody already did this, and maybe point me to the right direction. 也许从linux使用scp命令,只是想知道是否有人已经这样做了,并且可能指向正确的方向。

Thanks 谢谢

The SCP plugin should fit your needs. SCP插件应该符合您的需求。

It lets you choose between using a key or username/ password. 它允许您选择使用密钥或用户名/密码。 Destinations are configured in the central Hudson/ Jenkins config, then you can choose a destination to upload to in a specific job. 目标在Hudson / Jenkins中央配置中配置,然后您可以选择要在特定作业中上载的目标。 And in the job you can specify a pattern matching the desired file(s) to upload. 在作业中,您可以指定与要上载的所需文件匹配的模式。

In your hudson job? 你的哈德森工作? Sure, you could use scp in an "execute shell" build step. 当然,您可以在“执行shell”构建步骤中使用scp。 For getting this to work you probably need to have public-key authentication setup between the two hosts, IIRC scp does not allow you to specify a password. 为了使其工作,您可能需要在两台主机之间设置公钥验证,IIRC scp不允许您指定密码。

There are also several plugins for copying build artifacts to other systems (see http://wiki.hudson-ci.org/display/HUDSON/All+Plugins+by+Topic#AllPluginsbyTopic-Artifactuploaders ), for instance there is an scp artifact archiver. 还有几个用于将构建工件复制到其他系统的插件(请参阅http://wiki.hudson-ci.org/display/HUDSON/All+Plugins+by+Topic#AllPluginsbyTopic-Artifactuploaders ),例如有一个scp工件归档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM