With Pipelines for Merge Requests feature, users cannout keep using
$CI_COMMIT_REF_NAME and _SLUG predefined variables for dynamic
environments. We fix this problem by explicitly looking at the source
ref.
This commits extract code responsible for calculating essential CI/CD
variables to a separate concern. This makes it possible to share this
code between a `Ci::Build` and a `Ci::Bridge`.
We might want to refactor this to use composition instead of
inheritance.