Use proper syntax for gitlab job dependencies
Use proper syntax for gitlab job dependencies

The 'dependencies' actually means the list of artifacts, while the dependencies
are expressed with 'needs' keyword which by default implies artifact list as
well. While at it, also reduce code duplication by using templates.

N. B: we have to be careful with optional jobs because this might lead to yaml
error in case of 'needs' referring to non-existent job.

Signed-off-by: Max <e70a095b736a12f80f0fca048eff08e2d8f3a0f8@here.com>

advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr