We have a small app which keeps our Octopus and our LaunchDarkly environments in sync.
We wrote a JSON configuration file (it’s a .net Core app), which looked like this
{
"OctopusSyncSettings": {
"EnvironmentSource": "someurl.octopus.blah.io",
"EnvironmentLocation": "region-code",
"ApiUrl": "https://someurl.octopus.blah.io/",
"ApiAccessKey": "API-SomeOctopusApiKey"
},
"LaunchDarklySyncSettings": {
"ProjectKey": "default",
"ApiUrl": "https://app.launchdarkly.com/api/v2/",
"ApiAccessKey": "api-SomeLaunchDarklyApiKey",
},
"MarketCode": "marketInformation"
}
We created variables in Octopus which were to be swapped out for specific variables in this file when the app is deployed.
See the screenshot
Thing is, when we deployed it via Octopus, only the LaunchDarklySyncSettings nodes had their variables swapped out with those found in the Octopus project. The ones in the OctopusSyncSettings node never ever swapped out, no matter what we did.
It was only on a whim that we renamed that JSON Node from OctopusSyncSettings to OctoSyncSettings that it finally started swapping those variables in the JSON file.
I am assuming somewhere the word “Octopus” is being kept as a reserved word, and those variable substitutions are being ignored.
Can someone point me at the json configuration stuff in github, or even look into this yourselves?
Cheers