Class: Chef::Resource::Deploy
- Inherits:
-
Chef::Resource
- Object
- Chef::Resource
- Chef::Resource::Deploy
- Defined in:
- lib/chef-deploy.rb
Instance Method Summary collapse
- #branch(arg = nil) ⇒ Object
- #copy_exclude(arg = nil) ⇒ Object
- #enable_submodules(arg = nil) ⇒ Object
- #environment(arg = nil) ⇒ Object
- #git_ssh_wrapper(arg = nil) ⇒ Object
- #git_user(arg = nil) ⇒ Object
- #group(arg = nil) ⇒ Object
-
#initialize(name, collection = nil, node = nil) ⇒ Deploy
constructor
A new instance of Deploy.
- #migrate(arg = nil) ⇒ Object
- #migration_command(arg = nil) ⇒ Object
- #repo(arg = nil) ⇒ Object
- #repository_cache(arg = nil) ⇒ Object
- #restart_command(arg = nil) ⇒ Object
- #revision(arg = nil) ⇒ Object
- #role(arg = nil) ⇒ Object
- #scm(arg = nil) ⇒ Object
- #shallow_clone(arg = false) ⇒ Object
- #strategy(arg = nil) ⇒ Object
- #svn_password(arg = nil) ⇒ Object
- #svn_username(arg = nil) ⇒ Object
- #user(arg = nil) ⇒ Object
Constructor Details
#initialize(name, collection = nil, node = nil) ⇒ Deploy
Returns a new instance of Deploy.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/chef-deploy.rb', line 23 def initialize(name, collection=nil, node=nil) super(name, collection, node) @resource_name = :deploy @deploy_to = name @branch = 'HEAD' @repository_cache = 'cached-copy' @copy_exclude = [] @revision = nil @action = :deploy @allowed_actions.push(:deploy) @allowed_actions.push(:rollback) @strategy = CachedDeploy end |
Instance Method Details
#branch(arg = nil) ⇒ Object
142 143 144 145 146 147 148 |
# File 'lib/chef-deploy.rb', line 142 def branch(arg=nil) set_or_return( :branch, arg, :kind_of => [ String ] ) end |
#copy_exclude(arg = nil) ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/chef-deploy.rb', line 126 def copy_exclude(arg=nil) set_or_return( :copy_exclude, arg, :kind_of => [ String ] ) end |
#enable_submodules(arg = nil) ⇒ Object
102 103 104 105 106 107 108 |
# File 'lib/chef-deploy.rb', line 102 def enable_submodules(arg=nil) set_or_return( :enable_submodules, arg, :kind_of => [ TrueClass, FalseClass ] ) end |
#environment(arg = nil) ⇒ Object
150 151 152 153 154 155 156 |
# File 'lib/chef-deploy.rb', line 150 def environment(arg=nil) set_or_return( :environment, arg, :kind_of => [ String ] ) end |
#git_ssh_wrapper(arg = nil) ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/chef-deploy.rb', line 158 def git_ssh_wrapper(arg=nil) set_or_return( :git_ssh_wrapper, arg, :kind_of => [ String ] ) end |
#git_user(arg = nil) ⇒ Object
86 87 88 89 90 91 92 |
# File 'lib/chef-deploy.rb', line 86 def git_user(arg=nil) set_or_return( :git_user, arg, :kind_of => [ String ] ) end |
#group(arg = nil) ⇒ Object
94 95 96 97 98 99 100 |
# File 'lib/chef-deploy.rb', line 94 def group(arg=nil) set_or_return( :group, arg, :kind_of => [ String ] ) end |
#migrate(arg = nil) ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/chef-deploy.rb', line 62 def migrate(arg=nil) set_or_return( :migrate, arg, :kind_of => [ TrueClass, FalseClass ] ) end |
#migration_command(arg = nil) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/chef-deploy.rb', line 70 def migration_command(arg=nil) set_or_return( :migration_command, arg, :kind_of => [ String ] ) end |
#repo(arg = nil) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/chef-deploy.rb', line 37 def repo(arg=nil) set_or_return( :repo, arg, :kind_of => [ String ] ) end |
#repository_cache(arg = nil) ⇒ Object
118 119 120 121 122 123 124 |
# File 'lib/chef-deploy.rb', line 118 def repository_cache(arg=nil) set_or_return( :repository_cache, arg, :kind_of => [ String ] ) end |
#restart_command(arg = nil) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/chef-deploy.rb', line 54 def restart_command(arg=nil) set_or_return( :restart_command, arg, :kind_of => [ String ] ) end |
#revision(arg = nil) ⇒ Object
134 135 136 137 138 139 140 |
# File 'lib/chef-deploy.rb', line 134 def revision(arg=nil) set_or_return( :revision, arg, :kind_of => [ String ] ) end |
#role(arg = nil) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/chef-deploy.rb', line 46 def role(arg=nil) set_or_return( :role, arg, :kind_of => [ String ] ) end |
#scm(arg = nil) ⇒ Object
166 167 168 169 170 171 172 |
# File 'lib/chef-deploy.rb', line 166 def scm(arg=nil) set_or_return( :scm, arg, :kind_of => [ String ] ) end |
#shallow_clone(arg = false) ⇒ Object
110 111 112 113 114 115 116 |
# File 'lib/chef-deploy.rb', line 110 def shallow_clone(arg=false) set_or_return( :shallow_clone, arg, :kind_of => [ TrueClass, FalseClass ] ) end |
#strategy(arg = nil) ⇒ Object
190 191 192 193 194 195 196 |
# File 'lib/chef-deploy.rb', line 190 def strategy(arg=nil) set_or_return( :strategy, arg, :kind_of => [ Class ] ) end |
#svn_password(arg = nil) ⇒ Object
182 183 184 185 186 187 188 |
# File 'lib/chef-deploy.rb', line 182 def svn_password(arg=nil) set_or_return( :svn_password, arg, :kind_of => [ String ] ) end |
#svn_username(arg = nil) ⇒ Object
174 175 176 177 178 179 180 |
# File 'lib/chef-deploy.rb', line 174 def svn_username(arg=nil) set_or_return( :svn_username, arg, :kind_of => [ String ] ) end |
#user(arg = nil) ⇒ Object
78 79 80 81 82 83 84 |
# File 'lib/chef-deploy.rb', line 78 def user(arg=nil) set_or_return( :user, arg, :kind_of => [ String ] ) end |