You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apply: to check module requirements before run (#358)
* apply: to check module requirements before run
modules must now provide a `make check` in their root makefile
make check must exit 0 on all modules before proceeding to apply
this allows checks for module specific binaries or check tokens permissions
* combine the module walk methods and return err
* custom makefile error logic
* allow overriding commands for apply and check
* add module commands to readme
* fix module error printing incorrect message
Copy file name to clipboardExpand all lines: docs/module-definition.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,17 @@ It also declares the module's dependencies to determine the order of execution
10
10
|`author`| string | Author of the module |
11
11
|`icon`| string | Path to logo image |
12
12
|`parameters`| list(Parameter) | Parameters to prompt users |
13
+
|`commands`| Commands | Commands to use instead of makefile defaults |
13
14
|`zeroVersion`| string([go-semver])| Zero versions its compatible with |
14
15
15
16
17
+
### Commands
18
+
Commands are the lifecycle of `zero apply`, it will run all module's `check phase`, then once satisfied run in sequence `apply phase` then if successful run `summary phase`.
|`check`| string |`make check`| Command to check module requirements. check is satisfied if exit code is 0 eg: `sh check-token.sh`, `zero apply` will check all modules before executing |
22
+
|`apply`| string |`make`| Command to execute the project provisioning. |
23
+
|`summary`| string |`make summary`| Command to summarize to users the module's output and next steps. |
0 commit comments