Posted over 3 years ago. Visible to the public.

Capistrano + Rails: Tagging production deploys

Just like Ruby Gems tag their version releases to the corresponding Git commit, it can be helpful to track production deploys within the commit history. This task does the tagging for you.

Capistrano 3

Copy
# lib/capistrano/tasks/deploy.rb namespace :deploy do ... desc 'Tag the deployed revision' task :tag_revision do date = Date.today.to_s puts `git tag deploy-#{date} #{fetch :current_revision}` puts `git push --tags origin` end end
Copy
# config/deploy/production.rb after 'deploy:finished', 'deploy:tag_revision'

Flaky tests are tests that sometimes fail for no obvious reason. They are the plague of many end-to-end (E2E) test suites that automate the browser through tools like Capybara and Selenium.

Join our free training event and learn to fix any flaky test suite, even in large legacy applications.

Owner of this card:

Avatar
Dominik Schöler
Last edit:
over 3 years ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more