Search code examples
gitlabtagsgitlab-cigitlab-ci-runner

Run tagged jobs Gitlab


I have set up my own runner in gitlab where I run my project's pipelines. I'm new to this of the Tags and I already informed myself a little about it.

But in my .gitlab-ci.yml I put a tag, for example build-v1.0.0 in build job. However, in order for the job to run, I need to put that tag in the Runner's log. CI/CD Settings -> Runner Code -> Edit

enter image description here

I have already registered some Tags in the runner, but I am trying to put a pattern so that it recognizes the prefix of N tags, something like that.

enter image description here

Is there a way that I can place the N tags I want without having to register them in the runner?


Solution

  • No, tags must match exactly. It seems like you are trying to use runner tags outside of their intended purpose.

    Runner tags, not to be confused with git tags, are typically meant to be relatively static and describe general capabilities of the runner. This is because tags are (one way) how you make sure specific jobs are run by a specific runner. Runner tags are generally not used to describe the version of a particular software build.

    For example, you might tag a runner with things like the operating system like ubuntu or windows-server-2019, or CPU architecture like armv7 or amd64 -- or whatever tags that describe environment/capabilities of the runner that are necessary for your builds. You typically would not use runner tags for every version of your software.