forked from kentaro/webistrano
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add locking - A running deployment locks the stage
so that no other deployment ca be run. Overridable by checkbox git-svn-id: svn+ssh://phoenix/srv/svn/webistrano/trunk@207 e1153f85-6c6c-dc11-afa8-0013d3c39b19
- Loading branch information
jweiss
committed
Feb 23, 2009
1 parent
230157c
commit ef87230
Showing
17 changed files
with
625 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<p> | ||
WARNING: The stage is locked. | ||
</p> | ||
<% if stage.locking_deployment %> | ||
<p> | ||
This stage is being deployed by <%= link_to h(stage.locking_deployment.user.login), user_path(stage.locking_deployment.user) %> who executed <%=link_to h(stage.locking_deployment.task), project_stage_deployment_path(current_project, current_stage, stage.locking_deployment) %> at <%=h stage.locking_deployment.created_at.to_s(:log) %> | ||
</p> | ||
<p> | ||
Override locking and deploy anyhow? <input type="checkbox" id="override_locking_trigger" value="1"> | ||
</p> | ||
<% end %> | ||
|
||
<% content_for(:page_scripts) do %> | ||
<script type="text/javascript"> | ||
Event.observe(window, 'load', function(){ | ||
var trigger = $('override_locking_trigger'); | ||
var target = $('deployment_override_locking'); | ||
|
||
Event.observe(trigger, 'change', function(){ | ||
if(trigger.checked){ | ||
target.value = 1; | ||
}else{ | ||
target.value = 0; | ||
} | ||
}) | ||
}); | ||
</script> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class AddLockingToStage < ActiveRecord::Migration | ||
def self.up | ||
add_column :stages, :locked_by_deployment_id, :integer | ||
add_column :stages, :locked, :integer, :default => 0 | ||
end | ||
|
||
def self.down | ||
remove_column :stages, :locked_by_deployment_id | ||
remove_column :stages, :locked | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# add a test:non_transactional task that executes all tests in test/non_transactional/*_test.rb | ||
namespace :test do | ||
|
||
Rake::TestTask.new(:non_transactional) do |t| | ||
t.pattern = 'test/non_transactional/*_test.rb' | ||
t.ruby_opts << '-rubygems' | ||
t.verbose = true | ||
end | ||
|
||
end | ||
|
Oops, something went wrong.