SecretsManager icon indicating copy to clipboard operation
SecretsManager copied to clipboard

Doesn't work with Xcode Cloud environment variables

Open mgrider opened this issue 2 years ago • 3 comments

This plugin is almost exactly what I was looking for.

Even though the format of the .env file makes it seem like these are variables in the environment, they are not. The plugin is just parsing that file line by line. Because of this, the plugin will only build when the .env file is present, and is incompatible with actual environment variables.

I'm not exactly sure what changes would be needed to make this work with actual environment variables, but probably something in the project that tells the plugin which variables it needs to look for.

mgrider avatar Sep 15 '23 17:09 mgrider

This tool does have support for this already! But I forgot to document it 😅. You may want to combo it with a ci_post_clone.sh script to generate a .env file with just the keys exported. See this section I just added to the README for the format

vdka avatar Sep 15 '23 23:09 vdka

Ahhh, I see it in there now. I'm still a little fuzzy on how you'd use it that way... wouldn't you then have to commit the .env file? And locally, I guess you'd also have "real" environment variables in your .zsh or something?

mgrider avatar Sep 17 '23 18:09 mgrider

Personally for CI I have a ci_scripts/ci_post_clone.sh script that copies a pre-existing ci_scripts/ci_env file to .env. Locally I have .env in my .gitignore and have included the relevant keys there.

vdka avatar Sep 21 '23 02:09 vdka