Search code examples
gitlabgitlab-cigitlab-ci-runner

Call specific runner for Git script


How I can call a specific runner for CI job. Problem: I have default runners and now I have to install my local runner and run tests on it. But I haven't a possibility to turn off runners on the Git because the whole project builds on remote drivers.


Solution

  • You can use tags to tag a runner, when you register it. And you can specify that your job will only run on runners with this tags.

    eg. you tagged your runner with 'fancy-example' than you can use it like

    build:
       tags:
          - fancy-example
       script:
          - echo Hello
    

    See the gitLab docs for more detailed examples and explanations: https://docs.gitlab.com/ce/ci/yaml/README.html#tags