誰かが私をここで正しい方向に向けることができることを願っています。アプリケーションがHerokuにタグをデプロイする方法と、それを利用してタグ/ブランチの組み合わせを使用して本番環境にホットフィックスを作成する方法をよりよく理解したいと思います。HerokuでRails3.1アプリを実行しています。
これは、デモ用のカスタムデプロイレーキタスクからの出力です。
git push origin tag deploy.120716134715
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:myusername/myrepository.git
* [new tag] deploy.120716134715 -> deploy.120716134715
deploy tag deploy.120716134715 was created
git push demo deploy.120716134715:master --force
Everything up-to-date
git tag demo.120716134726 deploy.120716134715
git push origin tag demo.120716134726
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:myusername/myrepository.git
* [new tag] demo.120716134726 -> demo.120716134726
そこで、デプロイタグを作成し、それをherokuデモアプリにプッシュしてから、デプロイタグからデモタグを作成します。
私のプロダクションレーキタスクの出力は似ています:
Push deploy.120716132600 to Production? Type 'y' to deploy
y
deploying
git push production deploy.120716132600:master --force
Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 1.42 KiB, done.
Total 15 (delta 12), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
All dependencies are satisfied
-----> Installing Exceptional plugin from git://github.com/exceptional/exceptional.git... done.
-----> Installing quick_sendgrid plugin from git://github.com/pedro/quick_sendgrid.git... done.
-----> Configuring New Relic plugin... done.
Installing the New Relic plugin... done.
-----> Compiled slug size is 29.2MB
-----> Launching... done, v291
-----> Deploy hooks scheduled, check output in your logs
http://my-app-production.heroku.com deployed to Heroku
To git@heroku.com:my-app-production.git
9d0f2ca..9827475 deploy.120716132600 -> master
git push origin refs/tags/deploy.120716132600:refs/tags/production.120716133802
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:myusername/myrepository.git
* [new tag] deploy.120716132600 -> production.120716133802
そのため、デプロイタグがHeroku本番アプリにプッシュされてから、本番タグが作成されてオリジンにプッシュされます。
だから私の質問は、本番環境にホットフィックスを加えるための現在の最良のアプローチは何ですか?すでにローカルでコミットしてからプッシュしたマスターブランチに変更があるとしましょう。本番環境で行っていることをローカルでプルダウンし、変更し、コミットして、本番環境に加えた新しい変更をプッシュせずに本番環境に戻すための最良のアプローチは何でしょうか。
これも可能ですか?
皆様のご協力に感謝いたします。また、他にどのような情報を提供する必要があるかをお知らせください。私が言ったように、Rails 3.1アプリ、Herokuのデモおよびプロダクションアプリ。