From f2ee27ee020009563f5a0b294c8983db58d8406c Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Wed, 20 Nov 2024 11:25:53 +0100
Subject: [PATCH] mention all components once

---
 .deploy.gitlab-ci.yml | 31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/.deploy.gitlab-ci.yml b/.deploy.gitlab-ci.yml
index 346946a8c..bd318d573 100644
--- a/.deploy.gitlab-ci.yml
+++ b/.deploy.gitlab-ci.yml
@@ -11,11 +11,7 @@ stages:
 # To deploy manually, get the env.yaml and the .levant.nomad file,
 # and run docker run --rm -i --net=host -v /path/to/env.yaml:/env.yaml:ro hashicorp/levant deploy --var-file=/env.yaml /dev/stdin < /path/to/file.levant.nomad
 
-render_levant:
-  stage: render
-  image:
-    name: hashicorp/levant
-    entrypoint: [ "" ]
+.components:
   parallel:
     matrix:
       - COMPONENT:
@@ -33,6 +29,13 @@ render_levant:
           - snmp-exporter
           - landing-page
           - rpc-server
+
+render_levant:
+  extends: .components
+  stage: render
+  image:
+    name: hashicorp/levant
+    entrypoint: [ "" ]
   script:
     - |
       if [ "${STATION}" == "dts-lab" ]; then
@@ -56,6 +59,7 @@ render_levant:
       - ${STATION}-${COMPONENT}.nomad
 
 deploy_nomad:
+  extends: .components
   stage: deploy
   # gitlab evaluates parallel.matrix after needs/dependencies,
   # so we cannot use $COMPONENT in the dependencies.
@@ -64,23 +68,6 @@ deploy_nomad:
     - render_levant
   dependencies:
     - render_levant
-  parallel:
-    matrix:
-      - COMPONENT:
-          - mesh-gateway
-          - monitoring
-          - logging
-          - tango
-          - object-storage
-          - object-replication
-          - sdptr
-          - device-server
-          - dsconfig
-          - ec-sim
-          - jupyter
-          - snmp-exporter
-          - landing-page
-          - rpc-server
   image:
     name: hashicorp/nomad
     entrypoint: [ "" ]
-- 
GitLab