grim/convey

Add documentation for extend task.

2017-09-20, Eric Fritz
a4b424d543a1
Parents e5f7d6a58506
Children e8401b751c4d
Add documentation for extend task.
--- a/REFERENCE.md Wed Sep 20 16:13:09 2017 -0500
+++ b/REFERENCE.md Wed Sep 20 19:12:43 2017 -0500
@@ -112,6 +112,34 @@
----
+### Extend task
+
+An extend task overrides the environment of another task.
+
+#### Attributes
+
+| Name | Required | Default | Description |
+| ----------- | -------- | ------- | ----------- |
+| task | Yes | | The name of the task to extend |
+| environment | | | The override environment |
+
+#### Example
+
+ greeting:
+ image: gliderlabs/alpine:edge
+ script:
+ - echo "${MESSAGE}"
+ environment:
+ - MESSAGE="Hello, World"
+
+ informal-greeting:
+ type: extend
+ task: base
+ environment:
+ - MESSAGE="Hi!"
+
+----
+
### Build task
A build task will build a docker image.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/extend.yml Wed Sep 20 19:12:43 2017 -0500
@@ -0,0 +1,27 @@
+# This plan includes a task that extends another task with
+# a different, higher precedence environment. Running this
+# plan should print foo, bar, then baz.
+
+tasks:
+ foo:
+ image: gliderlabs/alpine:edge
+ command: echo "${MESSAGE}"
+ environment:
+ - MESSAGE=foo
+
+ bar:
+ type: extend
+ task: foo
+ environment:
+ - MESSAGE=bar
+
+ baz:
+ type: extend
+ task: foo
+ environment:
+ - MESSAGE=baz
+
+plans:
+ default:
+ stages:
+ - tasks: [foo, bar, baz]