https://dagster.io/ logo
Title
l

Leo Qin

03/08/2023, 4:50 PM
hello - i'd like to expose an environment variable for my
setup.py
to use, but it seems that when I pass
--env
to the dagster-cloud CLI it is not set until after setup runs... is that correct? What are the alternatives?
I am using docker deploys fyi
the use case is to provide a token for installing packages from private git repositories
r

rex

03/09/2023, 4:29 PM
yeah that’s correct - @prha @Shalabh Chaturvedi do we have any other options here? Maybe configuring the
dagster_cloud_pre_install.sh
? https://docs.dagster.io/dagster-cloud/deployment/serverless
s

Shalabh Chaturvedi

03/09/2023, 5:12 PM
Hi Leo - if you are using ssh keys, there is a
DOCKER_BUILD_SSH: default
env you can set to pass this through. See example here: https://github.com/dagster-io/dagster-cloud-action/issues/86 If it is another token, one way to do this is to write it out the token to a file under your project directory before the build and deploy step, and then in
dagster_cloud_pre_install.sh
, read that file, set the env and delete the file . I'll look into if there is a better way to do this.