Is there a most recent and detailed-enough tutorial out there on how to set up a CI for an iOS project using Gitlab ?
I found many tutorials (see list below) - but it seems that things have changed at GitLab since these tutorials were made. Or they are simply not detailed and well-enough explained for me as a beginner. Therefore I wonder if there is a most accurate step-by-step explanation on how to set Gitlab-CI up for iOS on a Mac ?
In particular, I am looking for a Gitlab-CI step-by-step tutorial for an iOS project using Fastlane and having Cocoapods Dependencies.
Below you find the list of tutorials and pages that all say things about GitLab CI setup for iOS projects.
(I've followed all of them - but none is detailed enough for me as a beginner in CI or, really, is no longer accurate for 2019 and what GitLab represents today).
For all of the tutorials, I end up with Gitlab Pipeline errors.
Here a list of my open stackoverflow questions, each with its own Gitlab CI trial:
gitlab-runner register without sudo: I end up with "permission denied"
Stackoverflow Nr1
gitlab-runner register with docker: I end up with "root error" Stackoverflow Nr2
sudo gitlab-runner register with sudo: I end up with "root error" Stackoverflow Nr 3
Concrete questions:
Here is the list of tutorials I've found that explain Gitlab CI with iOS projects:
Setting up GitLab CI for iOS projects
How to set up GitLab Continuous Integration for iOS projects without a hassle
How to set up GitLab CI for iOS in three relatively simple steps
iOS Project (CI/CD): Integrating GitLab-CI, Fastlane, HockeyApp, and AppCenter
Here is the best tutorial on how to set up GitLab CI for an iOS-project that I have found.
Here are the findings that lead to a successful GitLab CI for an iOS-project:
sudo when dealing with the
gitlab-runner. (no sudo allowed whatsoever since Apple wants you to
have a user-mode connection with GitLab (and no system-mode as in a
docker or else)...The steps are as follows:
gitlab-runner stop (optional if already previous trials...)
gitlab-runner uninstall (optional if already previous trials...)
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token "ABCDEFG21sadfSAEGEAERE" \
--description "MyApp runner with shell" \
--tag-list ios \
--executor "shell"
(feel free to use different tags. Also, the token can be found under the GitLab page-->under Settings-->CI/CD-->Runner expand)
gitlab-runner install
gitlab-runner start
Furthermore, it turned out that the "permission denied" error on my GitLab Pipeline had nothing to do with GitLab itself - but was due to a Ruby version mismatch on my Mac that I connected with the gitlab-runner.
I was able to update my Ruby version with the help of this post (i.e. using chruby). There are other possibilities out there on how to update Ruby on your Mac.
It is important to understand that GitLab requires your Mac to have a stable Ruby environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With