Right now scripts running in standard-CI have no information about the environment they are running in. This is by design, because the scripts are supposed to behave the same if they are running locally or on a Jenkins slave.
But there are cases where letting the script know it is running in CI is useful. For example - to make it use the package mirrors in the CI system instead of getting packages over the internet.
It seems that essentially all the information that is passed to 'mock_runner.sh' on the command line should be made available to the automation script as environment variables. Additionally, information from Gerrit would probably also be useful.