Problems with Gitlab CI/CD on local machine

Viewed 792

I'm using gitlab-runner to run CI/CD locally.

It works properly when I specify all jobs in .gitlab-ci.yml like

stages:
  - test

test1:
  stage: test
  script:
    - echo "ok"

and run gitlab-runner exec shell test1

In general, I'd like to store different jobs in different files. For example, I make test-pipeline.yml with jobs that relates to the test stage in the folder named .gitlab.

The .gitlab-ci.yml contains only to rows

include:
  local: .gitlab/test-pipeline.yml

I commit and push changes to the remote repo and it works there but the command gitlab-runner exec shell job_name fails because it can't find such job.

Perhaps, I have to edit some of gitlab-runner's config but it's not obviously.

Has anybody faced with the same problem?

Thanks in advance!

1 Answers
Related