No commit activity in last 3 years
No release in over 3 years
Recreates a specified Git tag every time you deploy, with whatever codebase just got pushed live. This tag is used alongside another system, to deploy the latest production code to a newly autoscaled instance.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.0.0
 Project Readme

Capistrano EC2 Selfdeploy Tag

capistrano-ec2-selfdeploy-tag is used to replace a specific Git tag with whichever codebase was just successfully deployed. This same tag is then used alongside another system, in order to deploy the latest production code to a newly autoscaled EC2 instance.

The autoscale deployment system is not provided by this Gem.

Installing

gem install capistrano-ec2-selfdeploy-tag

In your deploy.rb:

require 'capistrano/ec2/selfdeploy/tag'

Now when you run a standard 'cap deploy', upon success you will see the following line in your output:

Recreating Git selfdeploy tag 'inproduction'...

When autoscaling a new EC2 instance and performing a self deploy, make sure you call 'cap ec2_instance deploy'. You will then see the following output instead:

This is a self deployment task - not recreating selfdeploy tag...

The 'ec2_instance deploy' prevents the selfdeploy_tag from being updated, and ensures the deployment branch is set to the selfdeploy_tag.

Overriding Defaults

By default, capistrano-ec2-selfdeploy-tag will use the Git tag 'inproduction'. You can use a different tag if you like. Put this in your deploy.rb:

set :selfdeploy_tag, "your_tag_name"

You can also decide to skip recreating the tag for specific deploy tasks. To do so, put this in your deploy.rb:

set :update_selfdeploy_tag, false