[18.10] Scope start-rails-specs changes rule to MR pipelines
What does this MR do and why?
This MR backports !8673 (merged) to fix the start-rails-specs CI job failing on tag pipelines with:
bash: [: ==: unary operator expectedcurl: (22) The requested URL returned error: 401
The start-rails-specs job had a changes rule for .tool-versions without an if condition, causing it to match tag pipelines where $CI_MERGE_REQUEST_PROJECT_PATH is unset.
Fix:
- Scope the
changesrule to MR pipelines by adding anifcondition - Quote
$CI_MERGE_REQUEST_PROJECT_PATHin bash comparisons for defensive coding
Example failing job: https://gitlab.com/gitlab-org/security/gitaly/-/jobs/13918003838
- Clean cherry-pick from
ffacaf39b