osism / cloud-in-a-box

Cloud in a box
https://osism.github.io/docs/guides/deploy-guide/examples/cloud-in-a-box
Apache License 2.0
17 stars 4 forks source link

Get error output a bit more convenient #291

Closed scoopex closed 2 months ago

scoopex commented 3 months ago

If CIAB install fails, you are getting currently also the tracing output of the add_error function.

deploy | + osism apply kubernetes-dashboard
deploy | WARNING: OSISM CLI should not be used as root user
deploy | 
deploy | 2024-07-22 08:41:50 | INFO     | Task cbd4d748-83e4-42fb-ba0f-45dad86becf6 (kubernetes-dashboard) was prepared for execution.
deploy | 2024-07-22 08:41:50 | INFO     | It takes a moment until task cbd4d748-83e4-42fb-ba0f-45dad86becf6 (kubernetes-dashboard) has been started and output is visible here.
deploy | + add_status error 'DEPLOY FAILED'
deploy | + local type=error
deploy | + local 'text=DEPLOY FAILED'
deploy | + '[' error = warn ']'
deploy | + '[' error = info ']'
deploy | + text='\e[5;41;1mERROR: DEPLOY FAILED\e[0m'
deploy | + [[ error = \i\n\f\o ]]
deploy | + [[ -n /var/log/install-cloud-in-a-box.log ]]
deploy | + text='\e[5;41;1mERROR: DEPLOY FAILED\e[0m\n\nReview /var/log/install-cloud-in-a-box.log to analyze what went wrong'
deploy | + sudo cp /etc/issue.net /etc/.issue.net.backup
deploy | + sudo cp /etc/issue /etc/.issue.backup
deploy | + cat /etc/.issue.net.backup
deploy | + sudo tee /etc/issue.net
deploy | + echo -e '\e[5;41;1mERROR: DEPLOY FAILED\e[0m\n\nReview /var/log/install-cloud-in-a-box.log to analyze what went wrong'
deploy | + cat /etc/.issue.backup
deploy | + sudo tee /etc/issue
deploy | + echo -e '\e[5;41;1mERROR: DEPLOY FAILED\e[0m\n\nReview /var/log/install-cloud-in-a-box.log to analyze what went wrong'

This change makes the error output a bit more convenient to read.