docs icon indicating copy to clipboard operation
docs copied to clipboard

Show list of environment variables in actions' parameters table

Open rogerluan opened this issue 3 years ago β€’ 8 comments

Description

My proposal is to have actions' environment variables displaying in the their Parameters table, e.g. this one:

image

The environment variables would be a new column.

This would save users from being forced to run fastlane action lane_name when they need to know the env var for their action (which's probably the most common scenario nowadays, specially for CI implementations).

I know that these tables are automatically generated, but I have zero knowledge on how to implement this as of today πŸ˜„ I'd like to hear some feedback on this idea!

rogerluan avatar Nov 23 '21 23:11 rogerluan

I feel like I tried to achieve this a few years ago, as I had the exact same thought as you described above. I have no more idea if and how I really tried to do it though.

janpio avatar Nov 24 '21 10:11 janpio

Thanks for the input @janpio ! Good to know I'm not the only one πŸ™ˆ

rogerluan avatar Nov 24 '21 22:11 rogerluan

πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘ Love to see this change! I might have a look at this to see how we can do this πŸ˜„

ainame avatar Nov 26 '21 14:11 ainame

That'd be amazing @ainame ! amaze

rogerluan avatar Nov 26 '21 15:11 rogerluan

It was super boring thing to do. We can just edit this markdown to add additional column and put ConfigItem#env_name on it. https://github.com/fastlane/fastlane/blob/2668eff4da5ecacba2a80a33124b486ca6b630b6/fastlane/lib/assets/ActionDetails.md.erb#L42-L50

BUT I got stuck in setting up local dev environment for this projectπŸ˜‚ I mean I managed to install Python 3.8.2 and run pyenv install however, mkdocs serve doesn't launch HTTP server so that I can't see the local preview. Will submit a PR after checking my change on my local. Maybe we need to discuss which position we'd like to place it within the table.

ainame avatar Dec 08 '21 10:12 ainame

@ainame would you be so kind and also update this repo's README with troubleshooting when/if you figure it out? I was also never able to set up my local env 😒

And I vote for the same position in the table as shown when you fastlane action xxxx 😁 e.g.:

+--------------------------------+--------------------------------+--------------------------------+-----------------------+
|                                                     deliver Options                                                      |
+--------------------------------+--------------------------------+--------------------------------+-----------------------+
| Key                            | Description                    | Env Var(s)                     | Default               |
+--------------------------------+--------------------------------+--------------------------------+-----------------------+
| api_key_path                   | Path to your App Store         | DELIVER_API_KEY_PATH,          |                       |
|                                | Connect API Key JSON file      | APP_STORE_CONNECT_API_KEY_PAT  |                       |
|                                | (https://docs.fastlane.tools/  | H                              |                       |
|                                | app-store-connect-api/#using-  |                                |                       |
|                                | fastlane-api-key-json-file)    |                                |                       |
| api_key                        | Your App Store Connect API     | DELIVER_API_KEY,               |                       |
|                                | Key information                | APP_STORE_CONNECT_API_KEY      |                       |
|                                | (https://docs.fastlane.tools/  |                                |                       |
|                                | app-store-connect-api/#using-  |                                |                       |
|                                | fastlane-api-key-hash-option)  |                                |                       |
| username                       | Your Apple ID Username         | DELIVER_USERNAME               | *                     |

rogerluan avatar Dec 08 '21 11:12 rogerluan

Hi @ainame @rogerluan, I spent "a moment" to figure out how I ran it locally after opening shell pipenv shell and installing dependencies with pipenv install last year πŸ˜„.

I tried to build docs before using mkdocs serve with mkdocs build and I thought that it was stuck. When you run it with verbose logs mkdocs build --verbose you'll see that is stuck at DEBUG - Reading: generated/available-plugins.md It seems that mkdocs takes around 10 minutes to read available-plugins.md 😲

So if you want to try it one more time, you could edit docs/generated/available-plugins.md contents, remove all of it, but leave the file. There is a hook hooks.py that should copy edited docs/generated/available-plugins.md to a proper place. When you run mkdocs serve it should setup local server in < 20 seconds.

Edit: I've added a pull request with an update to README.

lucgrabowski avatar May 10 '22 14:05 lucgrabowski

Amazing! Thank you @lucgrabowski ! 🀩

rogerluan avatar May 10 '22 20:05 rogerluan