Repository navigation
k9: deploy template render, Hunt capability grant, push-time K9 lane, K9-aware layout docs #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4b1065f
cb77f07
e5b52db
74e34e6
85e71b2
dc04df7
882dd75
7ba9e31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -529,6 +529,26 @@ container-init: | |
| fi | ||
| done | ||
|
|
||
| # The k9-svc deploy component ships as a template (deploy.k9.ncl.in): a | ||
| # file with brace tokens is not a K9 component. Render it once nothing is | ||
| # left to fill (init fills PROJECT_NAME and VERSION), so the K9 lane | ||
| # validates the real thing. The bracket spellings keep just from reading | ||
| # the token pattern as an interpolation. | ||
| DEPLOY_IN="container/deploy.k9.ncl.in" | ||
| DEPLOY_OUT="${DEPLOY_IN%.in}" | ||
| if [ -f "$DEPLOY_IN" ]; then | ||
| LEFT=$(grep -oE '[{][{][A-Za-z_]+[}][}]' "$DEPLOY_IN" | sort -u | tr '\n' ' ' || true) | ||
| if [ -n "$LEFT" ]; then | ||
| echo "Kept $DEPLOY_IN: unfilled tokens ${LEFT}remain." | ||
| echo " Run 'just init', then 'just container-init' again to render it." | ||
| elif [ -e "$DEPLOY_OUT" ]; then | ||
| echo "Kept $DEPLOY_IN: $DEPLOY_OUT already exists, so it was not overwritten." | ||
| else | ||
| mv "$DEPLOY_IN" "$DEPLOY_OUT" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On every successful render, this Useful? React with 👍 / 👎. |
||
| echo "Rendered $DEPLOY_OUT (K9 component, contract v1.0.0)." | ||
| fi | ||
| fi | ||
|
|
||
| echo "Container templates initialised." | ||
| echo "" | ||
| echo "Next steps:" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user follows the documented
just initpath incontainer/README.adoc, that recipe replaces every placeholder through its global substitution loop but never executes this new rendering block, which belongs only tocontainer-init. The result is a fully populatedcontainer/deploy.k9.ncl.inbut nocontainer/deploy.k9.ncl, so the documented validation and deployment commands fail unless the user unnecessarily runs a second initializer. Invoke the rendering logic frominitas well, or factor it into a shared recipe.Useful? React with 👍 / 👎.