Relation between job and runner tags

Hello everybody,

I have a question regarding the logic of tags between runner tags and pipeline job tags.
I already saw that there is a closed MR but I did not fully understand if this is now implemented or not.
I am currently running Gitlab-CE 14.4.

Let’s say I have multipe runners registered - some have a tag docker as they have docker executor and some have shell as they have shell executor. Now I want to set up multi-arch builds and add e.g. raspberry pi 4b for ARM. I would then add a tag amd64 to the x64 machine (tags: docker, amd64) and to the pi arm (tags: docker, arm). The other runners would keep shell. How do I need to add the tags to my jobs in order to have the pi run the ARM docker jobs and the x64 machine run the amd64 docker jobs? Is it some kind of or/and relation in the jobs or the runners?
All x64 docker runners are currently configured to also run untagged jobs.
Thanks in advance for your help.

Best regards Jörg

Since that issue is closed, rather than merged, it isn’t the the codebase. I don’t believe that a similar MR has been merged.

For your .gitlab-ci.yml file, I would personally do something like this:

    - build

.build: &build
    stage: build
    script: ...
    rules: ...

    <<: *build
        - docker
        - amd64

    <<: *build
        - docker

    <<: *build
        - shell

Or something similar. Of course, you’ll may well want to add custom variables and so on to the concrete build jobs.

Does that mean that the runner has to have any of the jobs tags, exactly the tags of the job or at least the jobs tags? From the answer I assume the runner has to have at least the jobs tags but could have additional tags. Is that correct?

Yes, that’s right. For example, I often have runners with tags like: build, test, lint etc. and only one of those would be applied to each pipeline job.