Hi, I have a job that seems to be failing in the pipeline for no reason. It started failing a few days ago, and I haven’t made any changes to it since then. Here’s the job:
init-job:
stage: scans
script:
- source ~/.bashrc
- rvm use ruby-3.0.0
tags:
- ios_cicd
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
when: always
Here’s the console log:
running with gitlab-runner 16.6.1 (f5da3c5a)
on aws-runner <RUNNER>, system ID: <ID>
Resolving secrets 00:00
Preparing the "shell" executor 00:00
Using Shell (bash) executor...
Preparing environment 00:01
Running on ip-<IP ADDRESS>...
Getting source from Git repository 00:01
Fetching changes with git depth set to 10...
Reinitialized existing Git repository in <GIT REPO>
Checking out 173e5bf8 as detached HEAD (ref is develop)...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:02
$ source ~/.bashrc
$ rvm use ruby-3.0.0
Warning! PATH is not properly set up, /Users/ec2-user/.rvm/gems/ruby-3.0.0/bin is not at first place.
<log>Usually this is caused by shell initialization files. Search for <code>PATH=...</code> entries.
You can also re-add RVM to your profile by running: <code>rvm get stable --auto-dotfiles</code>
To fix it temporarily in this shell session run: <code>rvm use ruby-3.0.0</code>
To ignore this error add <code>rvm_silence_path_mismatch_check_flag=1</code> to your <code>~/.rvmrc</code> file.
Using /Users/ec2-user/.rvm/gems/ruby-3.0.0
Ruby enVironment Manager 1.29.12 (latest) (c) 2009-2020 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
# Wrapper
Show/regenerate wrappers.
NOTE: This command delegates to 'gem wrapper' => <https://github.com/rvm/gem-wrappers>
## Usage
Show paths and generated wrappers:
rvm wrapper show
Show path to generated wrapper:
rvm wrapper show executable_name
Where `executable_name` is something like `ruby` or `rake`.
It is also possible to generate a wrapper for external scripts that require ruby:
rvm wrapper /full/path/to/script
Where `/full/path/to/script` is full path to existing script
Wrappers are generated automatically, but it is possible to rerun the process:
rvm wrapper regenerate
Documentation:
rvm wrapper [help]
For additional documentation please visit https://rvm.io
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit status 1
Here’s the console log from a successful run last week:
Running with gitlab-runner 16.1.0 (b72e108d)
on aws-runner <RUNNER>, system ID: <ID>
Resolving secrets 00:00
Preparing the "shell" executor 00:00
Using Shell (bash) executor...
Preparing environment 00:00
Running on <IP ADDRESS>...
Getting source from Git repository 00:02
Fetching changes with git depth set to 10...
Reinitialized existing Git repository in <GIT REPO>
Checking out c26fa5f7 as detached HEAD (ref is develop)...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:01
$ source ~/.bashrc
$ rvm use ruby-3.0.0
Warning! PATH is not properly set up, /Users/ec2-user/.rvm/gems/ruby-3.0.0/bin is not at first place.
<log>Usually this is caused by shell initialization files. Search for <code>PATH=...</code> entries.
You can also re-add RVM to your profile by running: <code>rvm get stable --auto-dotfiles</code>
To fix it temporarily in this shell session run: <code>rvm use ruby-3.0.0</code>
To ignore this error add <code>rvm_silence_path_mismatch_check_flag=1</code> to your <code>~/.rvmrc</code> file.
Using /Users/ec2-user/.rvm/gems/ruby-3.0.0
Cleaning up project directory and file based variables 00:00
Job succeeded
There’s obviously some extra stuff about the ruby wrappers, but the rest of the content is the same. I tried running rvm use ruby-3.0.0
in the AWS EC2 instance the pipeline is running on, and the only difference was this line at the end:
usage: 'rvm alias [action] [alias_name] [ruby_string]'
so again, not an error. I did have to reinstall gitlab-runner on Monday because the settings got messed up, but I don’t see how that would impact ruby.
Any ideas why this could be happening? Did a ruby update break things? Is there a way I can get an actual error message to figure out what’s happening?