Run job only if variable set

I use except and only to restrict my jobs (with many entries in the script keyword section) to specific branches but would now like to also restrict them based on if a certain variable is not set (or empty).

Is this currently possible? I am unable to find anything in the docs regarding this.

I am asking in regards to the entire job not part of the script keyword as I know this could be done via a shell if statement inside the particular element.

1 Like

There’s a relevant issue that needs some attention ! https://gitlab.com/gitlab-org/gitlab-ce/issues/18041