pallet.project documentation

Pallet projects are specified in a pallet.clj file.

The files are loaded by calling clojure.core/load in the pallet.project.load namespace. The defproject form in that file def's a pallet-project-map var, which is reset after loading.

defproject refers to pallet.project.loader/defproject.

add-default-phases

fn

[{:keys [phases]} project]

Adds default phases. Note that these are merged as ordinary clojure maps, not as server-specs, so that the project can remove default behaviour.

default-project

fn

[]

Return the default project, or nil if there is none.

merge-variant-node-specs

fn

[{:keys [node-spec groups], :as variant} {:keys [group-name], :as group}]

Use the node-specs specified in the variant. The variant can have a general node-spec, or a per-group node-spec under the :groups key

merge-variant-phases

fn

[{:keys [phases groups], :as variant} {:keys [group-name], :as group}]

Use the node-specs specified in the variant. The variant can have a general node-spec, or a per-group node-spec under the :groups key

pallet-file-exists?

fn

[pallet-file]
[]

Predicate to check if a pallet.clj file exists.

read-project

fn

[pallet-file]
[]

Read the project file

spec-from-project

fn

[{:keys [groups provider service], :as pallet-project} provider-kw selectors roles group-names]
[pallet-project provider-kw]

Compute the groups for a pallet project using the given compute service provider keyword. The node specs are filtered by the selector selector set, which defaults to #{:default}. The groups can be filtered by the roles set, and by group-names.

use-project!

fn

[project]

Set the specified project map as the default project.