#Host env variables

1 messages · Page 1 of 1 (latest)

silver vale
#

I am building functions to standardize a Ci workflow using python sdk, but i need to use lots of environment variables. By running the pyhton main script with python i am able to get envs with os.environ but when using functions it fails.

gusty kelp
#

Hey @silver vale! Yes, when using modules there's no direct access to host resources anymore. So they need to be specific arguments to functions now. See https://docs.dagger.io/developer-guide/overview/942201/execution-environment#host-resources

There's more context and discussion on a solution in the following Github issue that you can follow: https://github.com/dagger/dagger/issues/6112

There's also a more general idea to reduce CLI calls with lots of arguments: https://github.com/dagger/dagger/issues/6723

GitHub

Right now callers can pass their environment variables to modules by just reading them and setting them to function arg values, e.g. w/ the cli: dagger call my-function --some-arg $SOME_ARG_VALUE T...

GitHub

Somewhat related to #6112 but a bit more general Passing a large number of flags and args when using dagger call can become way too tedious to type out by hand. One example would be support for fil...

silver vale
#

Thx for you answer

#

i have another question, should i create a new post for it? => is it possible to publish dagger modules to private repos and/or consume them from private repos?

fiery torrent