grim/convey

Update reamde.
auto-split
2017-09-21, Eric Fritz
093477a2c281
Parents bd7a742de64a
Children b662dc6223a4
Update reamde.
  • +27 -4
    REFERENCE.md
  • --- a/REFERENCE.md Thu Sep 21 19:28:42 2017 -0500
    +++ b/REFERENCE.md Thu Sep 21 19:33:42 2017 -0500
    @@ -41,6 +41,10 @@
    This example shows how to have one file extend another, inheriting all of the plans and tasks that are
    not otherwise overwritten by the configuration file.
    +## extends-slice.yml
    +
    +This example shows how to expand an environment variable into a list in the context of a extended task.
    +
    ## script.yml
    This example shows how to use the script attribute of a run task.
    @@ -118,10 +122,14 @@
    #### Attributes
    -| Name | Required | Default | Description |
    -| ----------- | -------- | ------- | ----------- |
    -| task | Yes | | The name of the task to extend |
    -| environment | | | The override environment |
    +| Name | Required | Default | Description |
    +| ---------------- | -------- | ------- | ----------- |
    +| task | Yes | | The name of the task to extend |
    +| environment | | | The override environment |
    +| expand | | | The envvars which can be expanded into lists on use |
    +| expand_delimiter | | ; | The string to split mapped values by |
    +
    +The `expand` and `expand_delimiter` attributes allow an environment variable, which is an unstructured string, to act as if it is an array. This is useful for supplying an "abstract" parent task with several arguments for the same attribute (e.g. tags in a build task). Variables that occur in the environment with a name in expand will b esplit by the expand delimiter to form a list, where applicable.
    #### Example
    @@ -138,6 +146,21 @@
    environment:
    - MESSAGE="Hi!"
    +#### Example with Variable Expansion
    +
    + tag-alpine:
    + type: tag
    + source: gliderlabs/alpine:edge
    + destinations: ${TAGS}
    +
    + tag-concrete:
    + type: extend
    + task: tag-alpine
    + environment:
    + - TAGS=foo;bar;baz
    + expand:
    + - TAGS
    +
    ----
    ### Build task