Using MacOS-10.14.3, there is a problem with my GitLab CI for an iOS project (using fastlane):
I try to create a gitlab-runner on my Mac and I get quite far with it, except the following error message occurs during CI-failure:
It seems that the error happens at the before_script
for some reason.
Any idea what could be wrong here ?
From the fastlane page, I follow these instructions: Link
The Gitlab error seems to be related to a Ruby issue on Mac
I followed this suggestion here: I tried to re-install ruby, doing the following in a Terminal:
brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
But that did not help anything...
In case, interested, finding out what ruby is on my Mac:
ruby -v
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]
which ruby
/usr/local/opt/ruby/bin/ruby
I use docker with image alpine:latest
and I run my gitlab-runner from a Mac-Terminal with the following command:
sudo gitlab-runner run
Here is my Gemfile:
source 'https://rubygems.org'
gem 'fastlane'
gem 'cocoapods'
...and here is my gitlab-ci.yml file:
stages:
- unit_tests
- test_flight
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
before_script:
- gem install bundler
- bundle install
unit_tests:
dependencies: []
stage: unit_tests
artifacts:
paths:
- fastlane/screenshots
- fastlane/logs
script:
- fastlane tests
tags:
- ios
test_flight_build:
dependencies: []
stage: test_flight
artifacts:
paths:
- fastlane/screenshots
- fastlane/logs
script:
- fastlane testflight
tags:
- ios
only:
- /^release-.*$/
- master
Any idea on how to change this GitLab CI File (or do anything else) so that this annoying gem install bundler
error goes away ?? Any help appreciated.