-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Added RTD_VERSION_SLUG environment variable. #1570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'll leave the review up to @agjohnson who knows the infrastructure in that place best. |
This is only implemented on the We expose a |
Sounds like we should have a "Add env variables" function that is shared between both Command classes? |
Possibly. There is an added restriction here because env vars are added to the See also: |
Ok, I will change the name of the environment variable and add it to the DockerBuildCommand as described above. |
Seems good. The only change I would say is make it |
Ok I don't get the last comment correctly? I now should omit to pass the environment variable to the DockerBuilder and only rename it? |
Adds another environment var for the project slug. Adds both to DockerEnvironment create_container function.
Ok I updated the PR. Hope this is done correctly. I am not so the python guy ... yet 😄 |
@@ -539,6 +542,8 @@ def create_container(self): | |||
} | |||
}), | |||
detach=True, | |||
environment = {'READTHEDOCS_VERSION' : self.version.slug, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed. The top part is the only bit that will run in prod.
Remove these lines, and I'll merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this was the thing that confused me if I should still provide this to the DockerEnvironment.
This will effectively do nothing now that we are running build environments through Docker. My last comment above still stands, this will in fact need to be established on Docker container creation as well. |
This is where I added the |
It does work in the same way -- that is, it doesn't work :) The above env pieces are only added on the These pieces should be added to |
Ok i pushed the changes to the DockerEnvironment. |
Great, thanks! |
Added RTD_VERSION_SLUG environment variable.
Oh cool. |
Not yet deployed, but we'll likely squeeze those deploys in later today. |
Adds environment variable called RTD_VERSION_SLUG to identify selected version in conf.py.
See #1096 for more details.