Set SP_VERSION in Auto DevOps template only if not already set
Problem to solve
In https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/Auto-DevOps.gitlab-ci.yml we have the
SP_VERSION variable set. But when testing new images, we need to use different images. Instead of making the Auto DevOps template explicit and change the definition manually, it would be great to override this value with a project/group variable.
In the Auto DevOps template, check if the
SP_VERSION variable exists and set it only if it is not.
What does success look like, and how can we measure that?
If I set a project variable named
SP_VERSION, the Auto DevOps template will use that variable in jobs.