Add custom labels to a build

A cron task gets a nice CRON label in the build overview:


Is it possible to add custom labels to a job, e.g. when triggered from the API?

API builds get a different icon.

Thanks, that’s nice to know. But I’d like to have different names on the different builds I am creating (ProjectA, ProjectB, etc)

I don’t quite see what the intended use case is. The whole purpose of CI is to run the same stuff every time so labelling builds “Project A”/“Project B” makes no sense.

I have a monorepo with 10 projects in it. If a commit only touches two projects, I have a parent build that uses the api to create a matrix build with those two. If shared code is changed, a matrix build with all ten is created. Et cetera.

If you are using requests API to create builds, you can override the commit message and prepend project tags to it.

Yes, I do that already. I just wondered if it was possible to create the kind of labels that cron does.

1 Like