An alternative to using global variables would be project variables. Project variables are included into bundles. Hence, when you push your project to automation (or another design node) custom project variables remain available.
If you want to update their values you can do that from UI (Variables menu inside your project) or using Python API. Please see Alex’s examples from previous topics on this subject: