Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fastlane action and plugin difference

Tags:

fastlane

I have a use case where I have to generate release versions for testing builds that follow a well documented pipeline playbook set by our testers. I already have a function that runs the logic in ruby, but I am considering creating fastlane action or fastlane plugin. Under my use case, is action sufficient or I should consider a plugin?

like image 406
Moses Liao GZ Avatar asked Aug 24 '17 08:08

Moses Liao GZ


1 Answers

Fastlane plugins are similar to cocoapods pods:

  • you specify plugin name, version, dependencies and other info in a gemspec file (podspec alike)
  • you can have nested dependencies between plugins (Fastfile <- plugin1 <-plugin2 <- .. )
  • you save them in a proper repo
  • plugin is made of a set of actions or plugins
  • you add a plugin dependency via command:

fastlane add_plugin [plugin_name]

So, it's better to use plugins if you need its actions in many different places and/or you need to build up a composite plugin hierarchy structure.


Otherwise, fastlane actions are simple ruby files directly invoked from Fastfile, that can take input parameters, nonetheless see environment variables and can have a return parameter.

In order to 'clean' your code, fastlane actions could suffice.

like image 133
Biasu Avatar answered Oct 19 '22 11:10

Biasu