English 中文(简体)
Jenkins: FTP / SSH 部署,包括删除和转移档案
原标题:Jenkins: FTP / SSH deployment, including deletion and moving of files

我很想知道,如何利用偷窃和(或)sh子部署我的网络项目。

我们现在有一个自制的部署系统,能够处理此事,但我要向Jenkins转告。

我知道,在装上建筑工艺品时,他们会很好地发挥作用。 但是,它们可以删除或转移档案。

你们是否对我的问题有任何背后、pp或想法?

问题回答

我提出了一个简单的解决办法,将删除的档案和上载对遥远的FTP服务器的改动,作为在Jenkins使用简单的脱光镜片的建筑行动。 http://lftp.tech/lftp-man.html>rel=“nofollow noreferer”>Lftp Manual

在肖特,你在您的jenkins用户名录~/.netrc上创建了一个编织文件,并用您的FTP证书填写。

machine ftp.remote-host.com
login mySuperSweetUsername
password mySuperSweetPassword

Create an lftp script deploy.lftp and drop it in the root of your .git repo

set ftp:list-options -a
set cmd:fail-exit true
open ftp.remote-host.com
mirror --reverse --verbose --delete --exclude .git/ --exclude deploy.lftp  --ignore-time --recursion=always

然后添加“Exec壳牌”的行动,以在文字上执行偷窃。

lftp -f deploy.lftp

手提书

  • mirror: copy all changed files
  • reverse: push local files to a remote host. a regular mirror pulls from remote host to local.
  • verbose: dump all the notes about what files were copied where to the build log
  • delete: remove remote files no longer present in the git repo
  • exclude: don t publish .git directory or the deploy.lftp script.
  • ignore-time: won t publish based on file creation time. If you don t have this, in my case, all files got published since a fresh clone of the git repo updated the file create timestamps. It still works quite well though and even files modified by adding a single space in them were identified as different and uploaded.
  • recursion: will analyze every file rather than depending on folders to determine if any files in them were possibly modified. This isn t technically necessary since we re ignoring time stamps but I have it in here anyway.

我写了一篇文章,解释了我如何在Gite与Gite合编的“rel”中“no”一号只能通过FTP进入。 该条解释了如何从联邦移民局到Gite,如何利用Jenkins建造和向联邦移民局部署。 这种做法是完美的,但行之有效。 它只上载改变了档案,删除了从邮袋中删除的在东道国的档案(反之亦然)。





相关问题
VS 2008 : How to publish with out DLLs?

I have developed a web application in Visual Studio 2008 and want to publish it in to the production server. I see a publish option there.But its producing files with DLL. I dont want to publish only ...

Apache: Deploying a new site to the server

I have a site currently live on a domain. I would like to switch it to a new site, that is currently in a password protected sub directory on this server. I have a "Site Maintenance in Progress" page....

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Pylons deployment questions

I m a beginner with Pylons and I ve mostly developed on my localhost using the built-in web server. I think it s time to start deployment for my personal blog, I have a Debian Lenny server with ...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Need advice on my PHP development solution

Here is how our current php development solution is set up: Each developer work on their local machine. Each developer commit their change to a common SVN server (intranet). A commit hook upload the ...

loading from JAR files during deployment vs development

when i am loading some data into my java program, i usually use FileInputStream. however i deploy the program as a jar file and webstart, so i have to use getRessource() or getRessourceAsStream() to ...

热门标签