Implement the playbook software component
Implement the playbook component in adherence with the specifications (defined in the acceptance criteria). Tests should be written to verify each of the behaviors of this component. These tests should be put in the file packages/playbook/test/playbook-test.js
. The playbook component should be self-contained, which means no logic for the playbook should exist outside of this component.
Acceptance criteria:
-
Implement the playbook component using the playbook-architecture branch as a reference - adhere as closely as possible to the proposed API
- it's okay to add more granularity, but no pieces should be excluded
-
The playbook component accepts all supported forms of user input - environment variables
- CLI flags / switches
- playbook spec
-
The playbook should provide an API that exposes these properties to the pipeline in a formal model - the object(s) created by convict should not leak outside of this component
-
Test that convict loads properly -
Test that an option can be set using an environment variable -
Test that an option can be set using a cli flag / switch -
Test that an option can be set using the playbook spec (i.e., configuration file) -
Test precedence of options (env var > cli flag / switch > property in playbook spec) -
Test that a playbook spec can be specified -
Test that playbook spec is automatically found if file extension is not specified in playbook option -
Test that playbook spec can be loaded as YAML or CSON -
Test that playbook component exposes the Playbook model - verify that properties are accessible
- this model will be consumed by other components in the pipeline
-
100% of the lines in the playbook component are touched by tests (full coverage) -
Load the Playbook object in the main pipeline (lib/index.js)
Edited by Dan Allen