Module: Sprinkle::Deployment
- Included in:
- Script
- Defined in:
- lib/sprinkle/deployment.rb
Overview
Deployments
Deployment blocks specify deployment specific information about a sprinkle script. An example:
deployment do
# mechanism for deployment
delivery :capistrano do
recipes 'deploy'
end
# source based package installer defaults
source do
prefix '/usr/local'
archives '/usr/local/sources'
builds '/usr/local/build'
end
end
What the above example does is tell sprinkle that we will be using capistrano (Sprinkle::Actors::Capistrano) for deployment and everything within the block is capistrano specific configuration. For more information on what options are available, check the corresponding Sprinkle::Actors doc page.
In addition to what delivery mechanism we’re using, we specify some configuration options for the “source” command. The only things configurable, at this time, in the deployment block other than the delivery method are installers. If installers are configurable, they will say so on their corresponding documentation page. See Sprinkle::Installers
The deployment block must be included in the script file passed to the sprinkle executable. It may not be loaded from a required file unless you first manually include the Sprinkle::Deployment module in the Object class.
Only one deployment block is on any given sprinkle script
Defined Under Namespace
Classes: Deployment
Instance Method Summary collapse
-
#deployment(&block) ⇒ Object
The method outlined above which specifies deployment specific information for a sprinkle script.
Instance Method Details
#deployment(&block) ⇒ Object
The method outlined above which specifies deployment specific information for a sprinkle script. For more information, read the header of this module.
42 43 44 |
# File 'lib/sprinkle/deployment.rb', line 42 def deployment(&block) @deployment = Deployment.new(&block) end |