Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show list of environment variables in actions' parameters table #1124

Open
rogerluan opened this issue Nov 23, 2021 · 8 comments
Open

Show list of environment variables in actions' parameters table #1124

rogerluan opened this issue Nov 23, 2021 · 8 comments

Comments

@rogerluan
Copy link
Member

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!

@janpio
Copy link
Member

janpio commented Nov 24, 2021

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.

@rogerluan
Copy link
Member Author

Thanks for the input @janpio ! Good to know I'm not the only one 🙈

@ainame
Copy link
Contributor

ainame commented Nov 26, 2021

👍👍👍👍👍👍 Love to see this change! I might have a look at this to see how we can do this 😄

@rogerluan
Copy link
Member Author

That'd be amazing @ainame ! amaze

@ainame
Copy link
Contributor

ainame commented Dec 8, 2021

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.

@rogerluan
Copy link
Member Author

@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               | *                     |

@lucgrabowski
Copy link
Contributor

lucgrabowski commented May 10, 2022

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.

@rogerluan
Copy link
Member Author

Amazing! Thank you @lucgrabowski ! 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants