Align ATVM coverage and notes with template command
This commit is contained in:
@@ -697,6 +697,7 @@ def infer_metadata() -> Dict[str, object]:
|
||||
extra_options = [value for value in extra_options if isinstance(value, str) and value]
|
||||
return {
|
||||
"template": os.environ.get("ATVM_WATCHER_TEMPLATE", "unknown"),
|
||||
"template_command": os.environ.get("ATVM_WATCHER_TEMPLATE_COMMAND", ""),
|
||||
"config_family": os.environ.get("ATVM_WATCHER_CONFIG_FAMILY", "unknown"),
|
||||
"config_file": os.environ.get("ATVM_WATCHER_CONFIG_FILE", "unknown"),
|
||||
"migration_style": os.environ.get("ATVM_WATCHER_MIGRATION_STYLE", "ATVM automation validation"),
|
||||
@@ -765,6 +766,9 @@ def build_status_markdown(
|
||||
|
||||
if currents_url:
|
||||
notes = notes + [f"Currents recorded run: `{currents_url}`"]
|
||||
template_command = metadata.get("template_command")
|
||||
if isinstance(template_command, str) and template_command:
|
||||
notes = notes + [f"Template command: `{template_command}`"]
|
||||
|
||||
notes_block = "\n".join(f"- {note}" for note in notes) if notes else "- none"
|
||||
test_flow_lines = [f"- {step}" for step in get_test_flow(metadata.get("template"))]
|
||||
@@ -799,6 +803,7 @@ def build_status_markdown(
|
||||
"",
|
||||
"**COVERAGE:**",
|
||||
f"- template: `{metadata['template']}`",
|
||||
f"- categorize mode: `{'enabled' if metadata.get('categorized') else 'disabled'}`",
|
||||
f"- datastore/config family: `{metadata['config_family']}`",
|
||||
f"- config file: `{metadata.get('config_file', 'unknown')}`",
|
||||
f"- migration style: {metadata['migration_style']}",
|
||||
|
||||
@@ -9,6 +9,7 @@ Usage:
|
||||
Options:
|
||||
--build-name <name>
|
||||
--template <name>
|
||||
--template-command <text>
|
||||
--config-family <name>
|
||||
--config-file <path>
|
||||
--migration-style <text>
|
||||
@@ -22,6 +23,7 @@ EOF
|
||||
|
||||
BUILD_NAME=""
|
||||
TEMPLATE=""
|
||||
TEMPLATE_COMMAND=""
|
||||
CONFIG_FAMILY=""
|
||||
CONFIG_FILE=""
|
||||
MIGRATION_STYLE=""
|
||||
@@ -35,6 +37,7 @@ while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--build-name) BUILD_NAME="${2:-}"; shift 2 ;;
|
||||
--template) TEMPLATE="${2:-}"; shift 2 ;;
|
||||
--template-command) TEMPLATE_COMMAND="${2:-}"; shift 2 ;;
|
||||
--config-family) CONFIG_FAMILY="${2:-}"; shift 2 ;;
|
||||
--config-file) CONFIG_FILE="${2:-}"; shift 2 ;;
|
||||
--migration-style) MIGRATION_STYLE="${2:-}"; shift 2 ;;
|
||||
@@ -70,6 +73,7 @@ PY
|
||||
|
||||
cat >"${RUN_DIR}/watch.env" <<EOF
|
||||
ATVM_WATCHER_TEMPLATE=${TEMPLATE@Q}
|
||||
ATVM_WATCHER_TEMPLATE_COMMAND=${TEMPLATE_COMMAND@Q}
|
||||
ATVM_WATCHER_CONFIG_FAMILY=${CONFIG_FAMILY@Q}
|
||||
ATVM_WATCHER_CONFIG_FILE=${CONFIG_FILE@Q}
|
||||
ATVM_WATCHER_MIGRATION_STYLE=${MIGRATION_STYLE@Q}
|
||||
|
||||
Reference in New Issue
Block a user