From 7d6eb42dc93ce654d3f8652bde82993b4d7892b1 Mon Sep 17 00:00:00 2001
From: andresanaya21 <alvaroandres.anayaamariles@telefonica.com>
Date: Thu, 13 Jun 2024 18:17:52 +0200
Subject: [PATCH] appVersion

---
 capif/templates/cd-deploy-ocf.gitlab-ci.yml | 99 +++++++++++++++++++--
 1 file changed, 90 insertions(+), 9 deletions(-)

diff --git a/capif/templates/cd-deploy-ocf.gitlab-ci.yml b/capif/templates/cd-deploy-ocf.gitlab-ci.yml
index 32b431b..771f4c8 100644
--- a/capif/templates/cd-deploy-ocf.gitlab-ci.yml
+++ b/capif/templates/cd-deploy-ocf.gitlab-ci.yml
@@ -56,9 +56,36 @@ deploy_ocf_staging:
       cat helm/capif/Chart.yaml
       yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/Chart.yaml
       cat helm/capif/Chart.yaml
-      ### Chart helper###
-      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/helper/Chart.yaml
-      cat helm/capif/charts/helper/Chart.yaml
+
+      ### Chart mock-server###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/mock-server/Chart.yaml
+      ### Chart nginx###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/nginx/Chart.yaml
+      ### Chart ocf-access-control-policy###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-access-control-policy/Chart.yaml
+      ### Chart ocf-api-invocation-logs###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-api-invocation-logs/Chart.yaml
+      ### Chart ocf-api-invoker-management###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-api-invoker-management/Chart.yaml
+      ### Chart ocf-api-provider-management###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-api-provider-management/Chart.yaml
+      ### Chart ocf-auditing-api-logs###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-auditing-api-logs/Chart.yaml
+      ### Chart ocf-discover-service-api###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-discover-service-api/Chart.yaml
+      ### Chart ocf-events###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-events/Chart.yaml
+      ### Chart ocf-helper###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/oocf-helper/Chart.yaml
+      ### Chart ocf-publish-service-api###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-publish-service-api/Chart.yaml
+      ### Chart ocf-register###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-register/Chart.yaml
+      ### Chart ocf-routing-info###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-routing-info/Chart.yaml
+      ### Chart ocf-security###
+      yq e -i ".appVersion = \"$IMAGE_TAG_STAGING\"" helm/capif/charts/ocf-security/Chart.yaml
+
       echo "### download dependencies###"
       helm dependency build helm/capif
       echo "### updating capif###"
@@ -183,9 +210,36 @@ deploy_ocf_oficial_staging:
       cat helm/capif/Chart.yaml
       yq e -i ".appVersion = \"staging\"" helm/capif/Chart.yaml
       cat helm/capif/Chart.yaml
-      ### Chart helper###
-      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/helper/Chart.yaml
-      cat helm/capif/charts/helper/Chart.yaml   
+
+      ### Chart mock-server###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/mock-server/Chart.yaml
+      ### Chart nginx###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/nginx/Chart.yaml
+      ### Chart ocf-access-control-policy###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-access-control-policy/Chart.yaml
+      ### Chart ocf-api-invocation-logs###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-api-invocation-logs/Chart.yaml
+      ### Chart ocf-api-invoker-management###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-api-invoker-management/Chart.yaml
+      ### Chart ocf-api-provider-management###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-api-provider-management/Chart.yaml
+      ### Chart ocf-auditing-api-logs###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-auditing-api-logs/Chart.yaml
+      ### Chart ocf-discover-service-api###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-discover-service-api/Chart.yaml
+      ### Chart ocf-events###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-events/Chart.yaml
+      ### Chart ocf-helper###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/oocf-helper/Chart.yaml
+      ### Chart ocf-publish-service-api###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-publish-service-api/Chart.yaml
+      ### Chart ocf-register###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-register/Chart.yaml
+      ### Chart ocf-routing-info###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-routing-info/Chart.yaml
+      ### Chart ocf-security###
+      yq e -i ".appVersion = \"staging\"" helm/capif/charts/ocf-security/Chart.yaml 
+
       echo "### download dependencies###"
       helm dependency build helm/capif
       echo "### updating capif###"
@@ -303,9 +357,36 @@ deploy_ocf_dev:
       cat helm/capif/Chart.yaml
       yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/Chart.yaml
       cat helm/capif/Chart.yaml
-      ### Chart helper###
-      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/helper/Chart.yaml
-      cat helm/capif/charts/helper/Chart.yaml     
+
+      ### Chart mock-server###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/mock-server/Chart.yaml
+      ### Chart nginx###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/nginx/Chart.yaml
+      ### Chart ocf-access-control-policy###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-access-control-policy/Chart.yaml
+      ### Chart ocf-api-invocation-logs###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-api-invocation-logs/Chart.yaml
+      ### Chart ocf-api-invoker-management###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-api-invoker-management/Chart.yaml
+      ### Chart ocf-api-provider-management###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-api-provider-management/Chart.yaml
+      ### Chart ocf-auditing-api-logs###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-auditing-api-logs/Chart.yaml
+      ### Chart ocf-discover-service-api###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-discover-service-api/Chart.yaml
+      ### Chart ocf-events###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-events/Chart.yaml
+      ### Chart ocf-helper###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/oocf-helper/Chart.yaml
+      ### Chart ocf-publish-service-api###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-publish-service-api/Chart.yaml
+      ### Chart ocf-register###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-register/Chart.yaml
+      ### Chart ocf-routing-info###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-routing-info/Chart.yaml
+      ### Chart ocf-security###
+      yq e -i ".appVersion = \"$IMAGE_TAG_DEV\"" helm/capif/charts/ocf-security/Chart.yaml
+
       echo "### download dependencies###"
       helm dependency build helm/capif
       echo "### updating capif###"
-- 
GitLab