I'm using single macOS GitLab runner to execute iOS jobs. The runner has been successfully paired with the GitLab and receives jobs, however, the job fails immediately and the runner reports back to the GitLab.
By looking at the runner logs, I'm unable to trace the issue, even when running the GitLab Runner in the --debug
mode.
Questions:
Job report on the GitLab web interface:
Running with gitlab-runner 11.7.0 (8cc638ff)
on iMac 8cc638ff
Using Shell executor...
Running on name-iMac.local...
Fetching changes...
ERROR: Job failed: exit status 1
Output of the gitlab-runner --debug run
command:
Checking for jobs... received job=216 repo_url=https://gitlab.local/software/ios.git runner=00000000
Failed to requeue the runner: builds=1 runner=00000000
Running with gitlab-runner 11.7.0 (8bb608ff) job=216 project=34 runner=00000000
on iMac 00000000 job=216 project=34 runner=00000000
Shell configuration: environment: []
dockercommand:
- sh
- -c
- "if [ -x /usr/local/bin/bash ]; then\n\texec /usr/local/bin/bash --login\nelif [
-x /usr/bin/bash ]; then\n\texec /usr/bin/bash --login\nelif [ -x /bin/bash ]; then\n\texec
/bin/bash --login\nelif [ -x /usr/local/bin/sh ]; then\n\texec /usr/local/bin/sh
--login\nelif [ -x /usr/bin/sh ]; then\n\texec /usr/bin/sh --login\nelif [ -x /bin/sh
]; then\n\texec /bin/sh --login\nelif [ -x /busybox/sh ]; then\n\texec /busybox/sh
--login\nelse\n\techo shell not found\n\texit 1\nfi\n\n"
command: bash
arguments:
- --login
passfile: false
extension: ""
job=216 project=34 runner=00000000
Using Shell executor... job=216 project=34 runner=00000000
Waiting for signals... job=216 project=34 runner=00000000
Executing build stage build_stage=prepare_script job=216 project=34 runner=00000000
Executing build stage build_stage=get_sources job=216 project=34 runner=00000000
Executing build stage build_stage=upload_artifacts_on_failure job=216 project=34 runner=00000000
WARNING: Job failed: exit status 1 duration=538.074ms job=216 project=34 runner=00000000
The gitlab-ci.yml
file I'm using:
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 beta
tags:
- ios
only:
- /^release-.*$/
- master
- testflight
It seems to be related RVM, and scripts it's adding into .bash_profile and .profile files.
source "$HOME/.rvm/scripts/rvm"
in .gitlab-ci.yml, in before_script
to use Ruby version set using RVM when pipeline runs