You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For local plugin development, I need to access some Netlify environment variables that aren't provided by build - SITE_ID for API calls and DEPLOY_ID and BUILD_ID to generate a mock UI. Using dotenv to set these manually works as expected, but when I set them using netlify.toml, only SITE_ID is passed. This is semi-related to #1514.
I know these are described as read-only in the documentation, but:
I can set SITE_ID, so it seems like I should be able to set them all
It would be helpful if local environments could override these vars
Describe the bug
For local plugin development, I need to access some Netlify environment variables that aren't provided by
build
-SITE_ID
for API calls andDEPLOY_ID
andBUILD_ID
to generate a mock UI. Usingdotenv
to set these manually works as expected, but when I set them usingnetlify.toml
, onlySITE_ID
is passed. This is semi-related to #1514.I know these are described as read-only in the documentation, but:
SITE_ID
, so it seems like I should be able to set them allConfiguration
You can see the calls at https://github.com/quarva/netlify-plugin-sitrep/blob/master/index.js - builds are run using
ntl build
and an untracked local netlify.toml, configured as below.envinfo
Logs
dotenv
.env
console.log(process.env)
netlify.toml
netlify.toml
console.log(process.env)
{ ... SITE_ID: 'SiteIDFromNetlify.toml', ... }
And for a sanity check:
console.log(SITE_ID + '-' + BUILD_ID + '-' + DEPLOY_ID);
The text was updated successfully, but these errors were encountered: