I am migrating API calls from old ENV using build_settings to new environment variables. I am using cURL calls to find a way to do it, but builds never pick up on it.
I want to set a variable MY_VAR and I use a call like so:
I tried cycling through all four possible contexts:
"dev"
"branch-deploy"
"deploy-preview"
"production"
And I see see in browser admin panel that the value is correctly assigned. So the API works. However, in neither case do builds pick up on the value.
I tested it and the only way for me to set the value for REAL right now is to go to the admin panel in my browser and set a value for all contexts in there.
The API does not support setting a value for all contexts at once which means I need to do 4 calls for each env var in order to have it in my builds.
This looks like a bug to me, but Netlify has been breaking for me recently in every possible aspect, so this may as well be intended behaviour.
Or is there some kind of combination I could you that doesn’t need all four? I have just 2 vars, but that’s already 8 calls to API when it was just 1 before.