I’m surprised that the tcb-env-setup.sh script setups aliases that run docker commands with -it (interactive terminal) flag. The only way to automate builds using industry standard CI/CD processes is to hack the script, unless I’m missing something obvious. We never run these commands manually, we always program a remote system to do them for us. I’m thinking we aren’t the only ones and are surprised this hasn’t been addressed yet.
We download the latest tool using wget and then run sed to fix this in our CI/CD process. Can this minor change that would be more user friendly for everyone doing CI/CD be resolved in a future release?
Example:
wget -O tcb-env-setup.sh https://raw.githubusercontent.com/toradex/tcb-env-setup/master/tcb-env-setup.sh
sed ‘s/-it//’ tcb-env-setup.sh > patched-tcb-env-setup.sh
. patched-tcb-env-setup.sh -a remote
Also, the aliases that are set only work in interactive terminals without some additional tweaks. This could also use some user friendly tweaks. We worked around it by always sourcing our scripts that wrap the TorizonCore Builder Tool script and ensure our scripts run ‘shopt -s expand_aliases’.
I highly recommend that Torizon core build tools get updates to be come user friendly for automation such as CI/CD build processes.