Is it possible to set environment variables for GCF so that all that settings would be visible to all functions? Or maybe there are some options to configure it in project's scope?
I'm just need a mechanism to parametrize all environments, like local-dev, dev, stage, prod for functions. For now I'm trying setup local datastore emulator and setup local development/debugging/testing workflow without writing if statements inside code. As I found such things can be configured through env. veriables, but I'm don't know how it would work on target platform in cloud.
In future staging will be made by division environments onto separate cloud projects with their's own databases and storages as well as env. variables.
Is it possible or is there any solution for something like that?
Not saying that Deployment Manager would not handle those the same way (although I could not spot it accurately), this below sounds like the closest answer to what you're talking about :
https://github.com/fredriks/cloud-functions-runtime-config/blob/master/README.md
Besides this example being an npm package, it shows clearly the gcloud commands to run.
It is important to activate the concerned api, as explained here (see 'before you begin')
I'm not entirely sure if these are meant for the role, but perhaps the Runtime Configurator variables in Deployment Manager could help you? You can store some key value pairs that way, accessible on project level.
Fundamentals are here.
The REST API reference here.