You will notice that fastlane can replace both build and codesign logic from our Jenkinsfiles and this approach has some advantages:
- easier to test it locally without jenkins (just run fastlane commands).
- more flexibility since it is just a couple of ruby scripts.
- fastlane actions can be distributed as ruby gem packages in the future.
- fastlane has several community plugins, which is easier to install within the jenkinsfile using the gem command if needed.
Currently, we can't sign our binaries with fastlane because of how our plugins (android signing and xcode) handle jenkins certificates and developer profile files.
I was thinking if we could create a jenkins plugin to properly handle credentials using the "withCredentials" pipeline function
so we could keep the main build/sign logic in fastlane actions while we keep specific jenkins tasks such as handling credentials, archiving the artifact, etc in the jenkisfile.