pallet.environment documentation

The environments provide mechanisms for customising Pallet and Pallet crates according to externally determined criteria.

An environment can be specified at the global, service, invocation and tag scopes.

To provide a global default, specify an :environment key at the top level of defpallet in ~/.pallet/config.clj.

To provide a service specific default, specify an :environment key at the service level of defpallet in ~/.pallet/config.clj.

To provide a project specific default, define pallet.config/environment.

To provide a specific environment when invoking lift or converge, pass an environment map using the :environment key.

The merging of values between scopes is key specific, and is determined by merge-key-algorithm.

Environment

var

A protocol for accessing an environment.

environment

fn

[_]

Returns an environment map

eval-environment

fn

[env-map]

Evaluate an environment literal. This is used to replace certain keys with objects constructed from the map of values provided. The keys that are evaluated are: - :user - :phases - :algorithms

get-environment

fn

[keys]
[keys default]

Environment accessor.

group-with-environment

fn

[environment group]

Add the environment to a group.

merge-environments

fn

[& maps]

Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (merge-key key val-in-result val-in-latter).

merge-key-algorithm

var

Map associating keys to merge algorithms. Specifies how environments are merged.

node-keys

var

node-specific environment keys

shell-expand-keys

fn

[user-map keys]

Shell-expand the values matching the specified keys