Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle one-off deployment tasks with capistrano?

I am currently trying to automate the deployment process of our rails app as much as possible, so that a clean build on the CI server can trigger an automated deployment on a test server.

But I have run into a bit of a snag with the following scenario: I have added the friendly_id gem to the application. There's a migration that creates all the necessary tables. But to fill these tables, I need to call a rake task.

Now, this rake tasks only has to be called once, so adding it to the deployment script would be overkill.

Ideally, I am looking for something like migrations, but instead of the database, it should keep track of scripts that need to be called during a deployment. Does such a beast already exist?

like image 742
AGraefe Avatar asked Jan 26 '10 11:01

AGraefe


People also ask

How Capistrano works?

How does Capistrano work? Capistrano is a framework written in Ruby that provides automated deploy scripts. It connects to your web server via SSH and executes a bunch of tasks that will make your app ready to shine.

Why use Capistrano?

Capistrano is a Ruby based remote server automation tool which can be easily used to automate mundane deployment and system management tasks. Using Capistrano, you can almost entirely automate all actions you would normally take to get your product live.


1 Answers

Looks like after_party gem does exactly what you want.

like image 191
cryo28 Avatar answered Oct 28 '22 23:10

cryo28