dploy icon indicating copy to clipboard operation
dploy copied to clipboard

Shared settings between environments

Open clemorphy opened this issue 8 years ago • 1 comments

Is there a way to define shared settings that will be used by several environments ? If the paths in the exclude list are the same for all my environments, and if this list is quite long, it may be useful to define it one time for all environments.

Is there currently a way of doing this ?

clemorphy avatar Nov 29 '15 14:11 clemorphy

You can create an anchor like this:

exclude:
  path: &path [".DS_Store", "aaaa", "bbbb", "node_modules", "cccc", "dddd", "package.json"]

dev:
    scheme: ftp
    host: ftp.xxxx.com
    port: 21
    user: xxx
    pass: xxx
    slots: 6
    path:
        local: /
        remote: public_html/xxxx
    exclude: *path

Anchor names must not contain the [, ], {, } and , characters.

*An anchor is denoted by the & indicator. It marks a node for future reference. An alias node can then be used to indicate additional inclusions of the anchored node. An anchored node need not be referenced by any alias nodes; in particular, it is valid for all nodes to be anchored.

polikin avatar Feb 22 '18 19:02 polikin