Class: Phase::Config::Deploy

Inherits:
Object
  • Object
show all
Defined in:
lib/phase/config/deploy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeploy

Returns a new instance of Deploy.



28
29
30
31
# File 'lib/phase/config/deploy.rb', line 28

def initialize
  @environments = []
  @version_lockfile = "VERSION"
end

Instance Attribute Details

#asset_bucketString

Returns the cloud storage bucket (“directory”) for storing compiled assets.

Examples:

Sample settings

config.deploy.asset_bucket = "static-assets"

Returns:

  • (String)

    the cloud storage bucket (“directory”) for storing compiled assets



25
26
27
# File 'lib/phase/config/deploy.rb', line 25

def asset_bucket
  @asset_bucket
end

#docker_repositoryString

Returns the compact or fully-qualified address of the Docker repository.

Examples:

Sample settings

config.deploy.docker_repository = "mycompany/myrepo"
config.deploy.docker_repository = "https://docker.mycompany.com/myrepo"

Returns:

  • (String)

    the compact or fully-qualified address of the Docker repository



13
14
15
# File 'lib/phase/config/deploy.rb', line 13

def docker_repository
  @docker_repository
end

#environmentsArray<Environment> (readonly)

Returns the configured deployment environments.

Returns:

  • (Array<Environment>)

    the configured deployment environments



6
7
8
# File 'lib/phase/config/deploy.rb', line 6

def environments
  @environments
end

#version_lockfileString

Returns the path (relative to Phasefile) to the version lockfile (default “VERSION”).

Examples:

Sample settings

config.deploy.version_lockfile = "lib/myproj/version.lock"

Returns:

  • (String)

    the path (relative to Phasefile) to the version lockfile (default “VERSION”)



19
20
21
# File 'lib/phase/config/deploy.rb', line 19

def version_lockfile
  @version_lockfile
end

Instance Method Details

#environment(name, options = {}) ⇒ Environment

Adds a new deployment environment.

Returns:



35
36
37
# File 'lib/phase/config/deploy.rb', line 35

def environment(name, options = {})
  @environments << Environment.new(name, options)
end