Add a command to check deploy page status via `gitlab-ctl deploy-page status`

See gitlab-com/infrastructure#441
This commit is contained in:
Stan Hu 2016-09-17 09:09:39 -07:00
parent 9c7ed75014
commit b8ffd251ae
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,10 @@ add_command 'deploy-page', 'Put up the deploy page', 2 do |cmd_name, state|
FileUtils.cp(deploy, index, verbose: true)
when 'down'
FileUtils.rm_f(index, verbose: true)
when 'status'
status = File.exist?(index) ? 'up' : 'down'
puts "Deploy page is #{status}"
else
puts "Usage: #{cmd_name} up|down"
puts "Usage: #{cmd_name} up|down|status"
end
end