Fix after_script / missing node logs
What does this MR do and why?
dump_machine_logs.sh is using ${ENV_NAME} defined in deployment-information template . Because scripts specified in after_script run in a shell context completely separate to the before_script and the specified scripts, variables are not exported to after_script and now we receive "line 98: ENV_NAME: unbound variable" error message.
To fix this, we have 2 options:
Redefining the MACHINES_NS and KIND_CLUSTER_NAME variables to be retrieved by the script and not from before_script or script . The update will retrieve machine logs for all workload clusters ( if existing) .
Tested in CI and on local deployments (CAPM3 and CAPO; with none, one or several wc only on local deployments)
Related reference(s)
Fixing #1767 (closed)
Edited by Alex Ghita