Home > Mobile >  Gitlab Runner on mac pro
Gitlab Runner on mac pro

Time:04-19

I've just finished installing gitlab runner on my m1 pro. I have registered a runner 2 different ways with and without sudo. Here's what I have:

me@MacBook-Pro pipelinetests % gitlab-runner list
Runtime platform                                    arch=arm64 os=darwin pid=49817 revision=bd40e3da version=14.9.1
Listing configured runners                          ConfigFile=/Users/jlee/.gitlab-runner/config.toml
me-mac-docker                                       Executor=docker Token=asdfasdf-asdf URL=https://ourgitlabserver.org

me@MacBook-Pro pipelinetests % sudo gitlab-runner list
Runtime platform                                    arch=arm64 os=darwin pid=49821 revision=bd40e3da version=14.9.1
Listing configured runners                          ConfigFile=/etc/gitlab-runner/config.toml
me-mac-docker2                                    Executor=docker machine Token=asdfasdf URL=https://ourgitlabserver.org

In my gitlab project, I can see the runners appear under the "Available specific runners" list. And i've made sure to add the right tag in my gitlab-ci.yml file. But when I run the pipeline, it's stuck with the error:

This job is stuck because you don't have any active runners online or available with any of these tags assigned to them: me-mac-docker23

Go to project CI settings

here's the list of runners:

enter image description here

And lastly here my code:

stages:
  - unit-test

Test:
  stage: unit-test
  environment:
    name: development
  image: mcr.microsoft.com/dotnet/core/sdk:3.1
  script:
    - curl -sL https://aka.ms/InstallAzureCLIDeb | bash
    - apt-get install curl && curl -sL https://deb.nodesource.com/setup_12.x | bash -
    - apt-get install nodejs
    - npm install -g azure-functions-core-tools@4 --unsafe-perm true
    - cd ./tests
    - dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=..\TestResults\test-results.xml;MethodFormat=Class;FailureBodyFormat=Verbose"
  artifacts:
    when: always
    paths:
      - ./TestResults/test-results.xml
    reports:
      junit:
        - ./TestResults/test-results.xml
  except:
    - master
  tags:
    - me-mac-docker23

One thing that's not clear to me is when i create the runners, what value should I specify for the executor?

I chose the default which was ruby:2.7 I've tried to find some article that explains what the list of values can be but so far no dice.

Please and thanks.

EDIT 1

Heres a screenshot showing you the status of the runner and when it was last contacted: (just showing one, but both say they're running)

enter image description here

CodePudding user response:

Your runner is registered and your tag settings are correct. However, it appears that your runner is not running based on the "Last Contact Time" being stated as "Never".

Runner registration and running your runner are two separate steps. Just because your runner is registered doesn't mean it will pick up jobs. You need to run gitlab-runner run as the user you want to use for the executor on the runner host.

Verify that your runner is running (you should see a gitlab-runner process) and that there are no obvious errors in its logs.

  • Related