From f173762ef7b9e51aeb717eb7c90ad374ec2e37f7 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Wed, 25 Jan 2023 14:54:46 +0000
Subject: [PATCH] CI/CD pipeline

- reduced dependencies since it breaks pipeline
---
 .gitlab-ci.yml                | 5 +----
 src/automation/.gitlab-ci.yml | 2 +-
 src/compute/.gitlab-ci.yml    | 2 +-
 src/context/.gitlab-ci.yml    | 2 +-
 src/device/.gitlab-ci.yml     | 2 +-
 src/monitoring/.gitlab-ci.yml | 2 +-
 src/pathcomp/.gitlab-ci.yml   | 5 ++---
 src/policy/.gitlab-ci.yml     | 2 +-
 src/service/.gitlab-ci.yml    | 2 +-
 src/slice/.gitlab-ci.yml      | 2 +-
 10 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dbc43f278..242f0b60d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,10 +18,7 @@ stages:
   - build
   - build
   - test
-  - unit_test_stage1
-  - unit_test_stage2
-  - unit_test_stage3
-  - unit_test_stage4
+  - unit_test
   #- deploy
   #- end2end_test
 
diff --git a/src/automation/.gitlab-ci.yml b/src/automation/.gitlab-ci.yml
index 610cf8eec..9c66a1798 100644
--- a/src/automation/.gitlab-ci.yml
+++ b/src/automation/.gitlab-ci.yml
@@ -42,7 +42,7 @@ build automation:
 unit_test automation:
   variables:
     REPORTS_CONTAINER: "${IMAGE_NAME}-reports"
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build automation
   before_script:
diff --git a/src/compute/.gitlab-ci.yml b/src/compute/.gitlab-ci.yml
index fdf8af236..d8614cd1c 100644
--- a/src/compute/.gitlab-ci.yml
+++ b/src/compute/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test compute:
   variables:
     IMAGE_NAME: 'compute' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build compute
   before_script:
diff --git a/src/context/.gitlab-ci.yml b/src/context/.gitlab-ci.yml
index 7d2a95e7c..044600bc5 100644
--- a/src/context/.gitlab-ci.yml
+++ b/src/context/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test context:
   variables:
     IMAGE_NAME: 'context' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build context
   before_script:
diff --git a/src/device/.gitlab-ci.yml b/src/device/.gitlab-ci.yml
index cb447e2e5..b0b32ab15 100644
--- a/src/device/.gitlab-ci.yml
+++ b/src/device/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test device:
   variables:
     IMAGE_NAME: 'device' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build device
   before_script:
diff --git a/src/monitoring/.gitlab-ci.yml b/src/monitoring/.gitlab-ci.yml
index 1dfefa1ee..4a981cba2 100644
--- a/src/monitoring/.gitlab-ci.yml
+++ b/src/monitoring/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test monitoring:
   variables:
     IMAGE_NAME: 'monitoring' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build monitoring
   before_script:
diff --git a/src/pathcomp/.gitlab-ci.yml b/src/pathcomp/.gitlab-ci.yml
index 5749a94fe..7658fcae9 100644
--- a/src/pathcomp/.gitlab-ci.yml
+++ b/src/pathcomp/.gitlab-ci.yml
@@ -52,7 +52,7 @@ unit_test pathcomp-backend:
   variables:
     IMAGE_NAME: 'pathcomp' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build pathcomp
   before_script:
@@ -97,10 +97,9 @@ unit_test pathcomp-frontend:
   variables:
     IMAGE_NAME: 'pathcomp' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage2
+  stage: unit_test
   needs:
     - build pathcomp
-    - unit_test pathcomp-backend
   before_script:
     - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
     - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create --driver=bridge --subnet=172.28.0.0/24 --gateway=172.28.0.254 teraflowbridge; fi
diff --git a/src/policy/.gitlab-ci.yml b/src/policy/.gitlab-ci.yml
index d19da81d6..f257c554c 100644
--- a/src/policy/.gitlab-ci.yml
+++ b/src/policy/.gitlab-ci.yml
@@ -42,7 +42,7 @@ build policy:
 unit_test policy:
   variables:
     REPORTS_CONTAINER: "${IMAGE_NAME_POLICY}-reports"
-  stage: unit_test_stage1
+  stage: unit_test
   needs:
     - build policy
   before_script:
diff --git a/src/service/.gitlab-ci.yml b/src/service/.gitlab-ci.yml
index cda011062..ae4b2c3af 100644
--- a/src/service/.gitlab-ci.yml
+++ b/src/service/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test service:
   variables:
     IMAGE_NAME: 'service' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage3
+  stage: unit_test
   needs:
     - build service
   before_script:
diff --git a/src/slice/.gitlab-ci.yml b/src/slice/.gitlab-ci.yml
index 5fbff7029..c1b2eb487 100644
--- a/src/slice/.gitlab-ci.yml
+++ b/src/slice/.gitlab-ci.yml
@@ -43,7 +43,7 @@ unit_test slice:
   variables:
     IMAGE_NAME: 'slice' # name of the microservice
     IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
-  stage: unit_test_stage4
+  stage: unit_test
   needs:
     - build slice
     - unit_test service
-- 
GitLab