Can a script that may be run by Buildbot's ShellCommand
detect whether it is indeed running inside the context of Buildbot (e.g. as opposed to having been started manually in a shell)?
For instance, does Buildbot set any environment variables (such as GitLab's CI_JOB_STAGE
that the script could inspect?
I am looking for a well-portable solution, so setting a proprietary environment variable e.g. at the level of some Buildbot builders or inspecting the script's parent process is not quite what I am looking for.