[wip] cli capability parity
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s
This commit is contained in:
@@ -16,7 +16,7 @@ All actions in the core pack are implemented as **pure POSIX shell scripts** wit
|
||||
**All actions use stdin with DOTENV format:**
|
||||
- Parameters read from **stdin** in `key=value` format
|
||||
- Use `parameter_delivery: stdin` and `parameter_format: dotenv` in YAML
|
||||
- Terminated with `---ATTUNE_PARAMS_END---` delimiter
|
||||
- Stdin is closed after delivery; scripts read until EOF
|
||||
- **DO NOT** use environment variables for parameters
|
||||
|
||||
**Example DOTENV input:**
|
||||
@@ -24,7 +24,6 @@ All actions in the core pack are implemented as **pure POSIX shell scripts** wit
|
||||
message="Hello World"
|
||||
seconds=5
|
||||
enabled=true
|
||||
---ATTUNE_PARAMS_END---
|
||||
```
|
||||
|
||||
## Output Format
|
||||
@@ -83,7 +82,7 @@ All core pack actions follow this pattern:
|
||||
# Brief description
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -91,11 +90,8 @@ set -e
|
||||
param1=""
|
||||
param2="default_value"
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*) break ;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
@@ -186,16 +182,16 @@ Test actions by echoing DOTENV format to stdin:
|
||||
|
||||
```bash
|
||||
# Test echo action
|
||||
printf 'message="Hello World"\n---ATTUNE_PARAMS_END---\n' | ./echo.sh
|
||||
printf 'message="Hello World"\n' | ./echo.sh
|
||||
|
||||
# Test with empty parameters
|
||||
printf '---ATTUNE_PARAMS_END---\n' | ./echo.sh
|
||||
printf '' | ./echo.sh
|
||||
|
||||
# Test sleep action
|
||||
printf 'seconds=2\nmessage="Sleeping..."\n---ATTUNE_PARAMS_END---\n' | ./sleep.sh
|
||||
printf 'seconds=2\nmessage="Sleeping..."\n' | ./sleep.sh
|
||||
|
||||
# Test http_request action
|
||||
printf 'url="https://api.github.com"\nmethod="GET"\n---ATTUNE_PARAMS_END---\n' | ./http_request.sh
|
||||
printf 'url="https://api.github.com"\nmethod="GET"\n' | ./http_request.sh
|
||||
|
||||
# Test with file input
|
||||
cat params.dotenv | ./echo.sh
|
||||
@@ -322,11 +318,8 @@ echo "[$ATTUNE_ACTION] [Exec: $ATTUNE_EXEC_ID] Starting" >&2
|
||||
url=""
|
||||
timeout="30"
|
||||
|
||||
# Read DOTENV parameters
|
||||
# Read DOTENV parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*) break ;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# API Wrapper for POST /api/v1/packs/build-envs
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -19,14 +19,8 @@ timeout="600"
|
||||
api_url="http://localhost:8080"
|
||||
api_token=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# API Wrapper for POST /api/v1/packs/download
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -17,14 +17,8 @@ verify_ssl="true"
|
||||
api_url="http://localhost:8080"
|
||||
api_token=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,20 +3,16 @@
|
||||
# Outputs a message to stdout
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq or yq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
# Initialize message variable
|
||||
message=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
message=*)
|
||||
# Extract value after message=
|
||||
message="${line#message=}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# API Wrapper for POST /api/v1/packs/dependencies
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -13,14 +13,8 @@ skip_validation="false"
|
||||
api_url="http://localhost:8080"
|
||||
api_token=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Make HTTP requests to external APIs using curl
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -37,11 +37,8 @@ cleanup() {
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Read DOTENV-formatted parameters
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*) break ;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Does nothing - useful for testing and placeholder workflows
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq or yq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -11,13 +11,9 @@ set -e
|
||||
message=""
|
||||
exit_code="0"
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
message=*)
|
||||
# Extract value after message=
|
||||
message="${line#message=}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# API Wrapper for POST /api/v1/packs/register-batch
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -16,14 +16,8 @@ force="false"
|
||||
api_url="http://localhost:8080"
|
||||
api_token=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
key="${line%%=*}"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Pauses execution for a specified duration
|
||||
#
|
||||
# This script uses pure POSIX shell without external dependencies like jq or yq.
|
||||
# It reads parameters in DOTENV format from stdin until the delimiter.
|
||||
# It reads parameters in DOTENV format from stdin until EOF.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -11,13 +11,9 @@ set -e
|
||||
seconds="1"
|
||||
message=""
|
||||
|
||||
# Read DOTENV-formatted parameters from stdin until delimiter
|
||||
# Read DOTENV-formatted parameters from stdin until EOF
|
||||
while IFS= read -r line; do
|
||||
# Check for parameter delimiter
|
||||
case "$line" in
|
||||
*"---ATTUNE_PARAMS_END---"*)
|
||||
break
|
||||
;;
|
||||
seconds=*)
|
||||
# Extract value after seconds=
|
||||
seconds="${line#seconds=}"
|
||||
|
||||
Reference in New Issue
Block a user