question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment variables not available when overriding build

See original GitHub issue

I’m working on documenting a project that will require long build times (exceeding available time on RTD). We already use GitHub Actions to build the necessary assets, and I’d hoped to build the documentation on the CI as well. In order to connect to RTD, my plan was to trigger a build on RTD via webhook, and have RTD pull the assets from the GitHub Actions Workflow. This requires a custom build process (build.commands).

Unfortunately, I observed that the access token I’d added to the environment variables in the project settings was not exposed to the builder logic. Here’s a build that demonstrates the problem:

(SPECIAL_TOKEN is not visible in the output of env in this build)

https://readthedocs.org/projects/test-ccache-gha/builds/17481074/

Apologies that this is so terse, and thanks for all of the hard work!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
humitoscommented, Aug 2, 2022

Hi! The fix for this issue was already deployed. I did a quick test in https://readthedocs.org/projects/test-builds/builds/17604894/ and I can see my variable there. Let me know if this works for you!

1reaction
agoose77commented, Jul 20, 2022

@agjohnson what are the odds! Thanks for making a cleaner test case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

environment context variables do not override build ... - GitHub
The fix is to set the environment variable inside the app.netlify.com UI itself. This is totally on us. Sorry. The requisite bug report...
Read more >
Environment variables on docker container are not override
Here's a working example: FROM busybox ARG SERVER="google.com" ENV SERVER=${SERVER} ENTRYPOINT "/bin/ash" "-c" "ping ${SERVER}". Then:
Read more >
Overriding ENV_VARS not working - Builds - Bitrise Discussions
I m trying to override a variable from ENV VARS using script action / step #!/bin/bash set -ex if [ ! -z “$API_BUILD_NO”...
Read more >
Overriding a release variable for deployment does not work for ...
If we want to override the variable for one of the deployments, we can add the variable on the 'Variables' tab of the...
Read more >
Environment variables not available when running/debugging ...
Occasionally, mostly when debugging issues, we need to use a local instance for S1 or S2; to avoid changing appsettings.json, we simply override...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found