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

Document SharedValues and ENV variables created by actions #468

Closed
janpio opened this issue Nov 21, 2017 · 10 comments
Closed

Document SharedValues and ENV variables created by actions #468

janpio opened this issue Nov 21, 2017 · 10 comments

Comments

@janpio
Copy link
Member

janpio commented Nov 21, 2017

Is this already documented somewhere?
Can this documentation be generated?
What would have to change so this can be done?

@revolter
Copy link
Collaborator

revolter commented Nov 21, 2017

The env variables are defined in the options.rb files (e.g. gym's options). And I guess you have to edit ActionDetails.md.erb to include config_item.env_name.

@janpio
Copy link
Member Author

janpio commented Nov 22, 2017

That can only be part of it. gym creates SharedValues::IPA_OUTPUT_PATH for example, gradle creates SharedValues::GRADLE_APK_OUTPUT_PATH.

@revolter
Copy link
Collaborator

I don't know about SharedValues, I was only referring to env variables.

@janpio
Copy link
Member Author

janpio commented Nov 22, 2017

A bit of investigation:

Some SharedValues seem to be "defined" here:
https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/gym.rb#L3-L6
But others are not listed there although set:
https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/gym.rb#L82
(Probably comes from somewhere else?)

IPA_OUTPUT_PATH is also written to an ENV variable:
https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/gym.rb#L77-L78
Same for DSYM_OUTPUT_PATH:
https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/gym.rb#L83

@revolter
Copy link
Collaborator

revolter commented Nov 22, 2017

But others are not listed there although set:
fastlane/fastlane:fastlane/lib/fastlane/actions/gym.rb@master#L82
(Probably comes from somewhere else?)

XCODEBUILD_ARCHIVE comes from https://github.com/fastlane/fastlane/blob/f08038b71e11d1338ca2222f3eaf9deff7c244c6/fastlane/lib/fastlane/actions/xcodebuild.rb#L5.

IPA_OUTPUT_PATH is also written to an ENV variable:
fastlane/fastlane:fastlane/lib/fastlane/actions/gym.rb@master#L77-L78

You don't need this information, as IPA_OUTPUT_PATH is defined in the SharedValues module, which can be extracted in the documentation.

@janpio
Copy link
Member Author

janpio commented Nov 22, 2017

You don't need this information, as IPA_OUTPUT_PATH is defined in the SharedValues module, which can be extracted in the documentation.

If this is consistent across all actions and plugins... I assumed it may not be ;)

But I agree, exposing "SharedValues" would probably be a great first step.
Then maybe define some rules about how it should be used in actions and plugins so it is consistent.

@mollyIV
Copy link
Member

mollyIV commented May 11, 2019

👋 We created a ticket about documenting SharedValues: fastlane/fastlane#14730

Maybe we can tackle ENV (environment variables for input parameters) in a separate ticket once we finish with the SharedValues? 🤔

@janpio
Copy link
Member Author

janpio commented May 11, 2019

Sounds like a plan. As ENV variables are not tracked anywhere, this might be a bit more effort though - maybe it makes sense to add something similar to SharedValues that also lists the ENV variables and also explains what they are used for.

@janpio
Copy link
Member Author

janpio commented Jan 19, 2020

@mollyIV, do you think we can/should close this issue as solved with what you implemented?

@mollyIV
Copy link
Member

mollyIV commented Jan 21, 2020

Document SharedValues ...

The part about documenting SharedValues is already implemented ✔️ If you go to the fastlane documentation, you can check what (if any) SharedValues are produced by an action, for instance build_ios_app action.

... and ENV variables created by actions

We created separate tickets to tackle it:

So overall I think we can close this ticket 👍

@janpio janpio closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants