Backport v2024 <- v2025dev1: Only pass CI_JOB_TOKEN when using custom images.
Backport !598 (merged)
Set image_needs_job_token when generating jobs and only pass CI_JOB_TOKEN when it’s defined. This avoids having to work around it when CI_JOB_TOKEN is not necessary and the job definition is used e.g. with lava-submit/lqa which do not support "job" variable.
Signed-off-by: Andrej Shadura andrew.shadura@collabora.co.uk