Multiple runners on the same Windows host

Hello,

I’m trying to add a second project to my specific gitlab runner which runs on a Windows machine. I don’t have any issues with the first project, the pipelines run as expected.

This is what I did to try to connect with my second project on the specific runner (shell).

Initially I tried using the same runner on the second project. I unchecked “Lock to current project” and activated it on my second project. But that got me the error:

Pipeline cannot be run.

Pipeline filtered out by workflow rules.

Then I registered a new runner on the same host:

  1. Register a new token on the Windows machine:
    ./gitlab-runner.exe register --url https://gitlab.com/ --registration-token XXXXXX

  2. The new runner registered appears on the Settings / CI/CD page / Runners.

  3. Same error appears when I try to run a pipeline

Pipeline cannot be run.

Pipeline filtered out by workflow rules.

This is my yml file:

 stages:
  - devENV-deploy
 devENV-deploy:
    stage: devENV-deploy
    tags:
        - core-compiled
    only:
        - develop
    script:
        - iisreset /stop
        - cd C:\inetpub\wwwroot\GPIframeDev
        - git reset --hard origin/develop
        - git pull origin develop
        - Copy-Item -Path C:\inetpub\wwwroot\GPIframeDev\appsettings.Development.json -Destination C:\inetpub\wwwroot\GPIframeDev\appsettings.json
        - iisreset /start

Does it help if you had different tags to the runners and target those tags in your jobs?