From e7677214aad0a73d5fb66bdcaf4735cbed48fab0 Mon Sep 17 00:00:00 2001
From: Lorenzo Pagliai <lorenzo.pagliai@seco.com>
Date: Mon, 20 Feb 2023 10:02:07 +0100
Subject: [PATCH] [FIX] Insert missing occurrencies of RECIPE_NAME

* Insert further variable inheritance for edgehog-embedded jobs
* Insert echo messages for debug
---
 boards/.a62.yml             | 4 +++-
 boards/.c20.yml             | 5 ++++-
 boards/.c31.yml             | 6 ++++--
 boards/.intel_apl.yml       | 1 +
 boards/.tanaro.yml          | 5 ++++-
 manifest-pipeline-yocto.yml | 4 ++++
 6 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/boards/.a62.yml b/boards/.a62.yml
index c410f6c..a77f0d8 100644
--- a/boards/.a62.yml
+++ b/boards/.a62.yml
@@ -43,6 +43,7 @@ deploy-edgehog-embedded-base-a62:
      artifacts: true
   variables:
       <<: *deploy-edgehog-a62
+      <<: *build-edgehog-embedded-a62
       IMAGE_NAME: edgehog-embedded-base-image
 
 #############################
@@ -54,7 +55,7 @@ build-edgehog-embedded-full-a62:
   rules: &embedded_full
     # Build only in case of a tag
     - if: $CI_COMMIT_TAG
-  variables: 
+  variables: &build-edgehog-embedded-a62-full
      <<: *build-edgehog-embedded-a62
      RECIPE_NAME: seco-image-edgehog-full
     
@@ -68,4 +69,5 @@ deploy-edgehog-embedded-full-a62:
      artifacts: true
   variables:
       <<: *deploy-edgehog-a62
+      <<: *build-edgehog-embedded-a62-full
       IMAGE_NAME: edgehog-embedded-full-image
\ No newline at end of file
diff --git a/boards/.c20.yml b/boards/.c20.yml
index 5244bb6..de69a61 100644
--- a/boards/.c20.yml
+++ b/boards/.c20.yml
@@ -10,6 +10,7 @@ build-edgehog-c20:
      BUILD_DIRECTORY: build_c20
      MACHINE: seco-imx8mq-c20
      DEFCONFIG_FILE: seco_sbc_c20_edgehog
+     RECIPE_NAME: seco-image-edgehog
 
 deploy-edgehog-c20:
   extends: .deploy
@@ -42,6 +43,7 @@ deploy-edgehog-embedded-base-c20:
      artifacts: true
   variables:
       <<: *deploy-edgehog-c20
+      <<: *build-edgehog-embedded-c20
       IMAGE_NAME: edgehog-embedded-base-image
 
 #############################
@@ -53,7 +55,7 @@ build-edgehog-embedded-full-c20:
   rules: &embedded_full
     # Build only in case of a tag
     - if: $CI_COMMIT_TAG
-  variables: 
+  variables: &build-edgehog-embedded-c20-full
      <<: *build-edgehog-embedded-c20
      RECIPE_NAME: seco-image-edgehog-full
     
@@ -67,4 +69,5 @@ deploy-edgehog-embedded-full-c20:
      artifacts: true
   variables:
       <<: *deploy-edgehog-c20
+      <<: *build-edgehog-embedded-c20-full
       IMAGE_NAME: edgehog-embedded-full-image
\ No newline at end of file
diff --git a/boards/.c31.yml b/boards/.c31.yml
index 246aa19..123ca9c 100644
--- a/boards/.c31.yml
+++ b/boards/.c31.yml
@@ -10,6 +10,7 @@ build-edgehog-c31:
      BUILD_DIRECTORY: build_c31
      MACHINE: seco-rk3399-c31
      DEFCONFIG_FILE: seco_sbc_c31_edgehog
+     RECIPE_NAME: seco-image-edgehog
      
 deploy-edgehog-c31:
   extends: .deploy
@@ -42,6 +43,7 @@ deploy-edgehog-embedded-base-c31:
      artifacts: true
   variables:
       <<: *deploy-edgehog-c31
+      <<: *build-edgehog-embedded-c31
       IMAGE_NAME: edgehog-embedded-base-image
 
 #############################
@@ -53,11 +55,10 @@ build-edgehog-embedded-full-c31:
   rules: &embedded_full
     # Build only in case of a tag
     - if: $CI_COMMIT_TAG
-  variables: 
+  variables: &build-edgehog-embedded-c31-full
      <<: *build-edgehog-embedded-c31
      RECIPE_NAME: seco-image-edgehog-full
 
-    
 deploy-edgehog-embedded-full-c31:
   extends: .deploy
   rules: 
@@ -68,4 +69,5 @@ deploy-edgehog-embedded-full-c31:
      artifacts: true
   variables:
       <<: *deploy-edgehog-c31
+      <<: *build-edgehog-embedded-c31-full
       IMAGE_NAME: edgehog-embedded-full-image
\ No newline at end of file
diff --git a/boards/.intel_apl.yml b/boards/.intel_apl.yml
index 44003fe..9a0e273 100644
--- a/boards/.intel_apl.yml
+++ b/boards/.intel_apl.yml
@@ -10,6 +10,7 @@ build-edgehog-intel-apl:
      BUILD_DIRECTORY: build_intel
      MACHINE: seco-intel-apl
      DEFCONFIG_FILE: seco_intel_apl_edgehog
+     RECIPE_NAME: seco-image-edgehog
     
 deploy-edgehog-intel-apl:
   extends: .deploy
diff --git a/boards/.tanaro.yml b/boards/.tanaro.yml
index fbb03b2..c0ddfe3 100644
--- a/boards/.tanaro.yml
+++ b/boards/.tanaro.yml
@@ -10,6 +10,7 @@ build-edgehog-tanaro:
     BUILD_DIRECTORY: build_tanaro
     MACHINE: seco-imx8mm-tanaro
     DEFCONFIG_FILE: seco_sbc_tanaro_edgehog
+    RECIPE_NAME: seco-image-edgehog
     
 deploy-edgehog-tanaro:
   extends: .deploy
@@ -42,6 +43,7 @@ deploy-edgehog-embedded-base-tanaro:
      artifacts: true
   variables:
       <<: *deploy-edgehog-tanaro
+      <<: *build-edgehog-embedded-tanaro
       IMAGE_NAME: edgehog-embedded-base-image
 
 #############################
@@ -53,7 +55,7 @@ build-edgehog-embedded-full-tanaro:
   rules: &embedded_full
     # Build only in case of a tag
     - if: $CI_COMMIT_TAG
-  variables: 
+  variables: &build-edgehog-embedded-tanaro-full
      <<: *build-edgehog-embedded-tanaro
      RECIPE_NAME: seco-image-edgehog-full
     
@@ -67,4 +69,5 @@ deploy-edgehog-embedded-full-tanaro:
      artifacts: true
   variables:
       <<: *deploy-edgehog-tanaro
+      <<: *build-edgehog-embedded-tanaro-full
       IMAGE_NAME: edgehog-embedded-full-image
\ No newline at end of file
diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml
index 1933315..35f38a8 100644
--- a/manifest-pipeline-yocto.yml
+++ b/manifest-pipeline-yocto.yml
@@ -195,6 +195,8 @@ retrigger:
          fi
          echo "This is the manifest repository URL used for the build: ${CI_REPOSITORY_URL}"
          echo "This is the manifest branch used for the build: ${BUILD_BRANCH}"
+         echo "This is the board for which the build will be performed: ${BOARD}"
+         echo "This is the bitbake recipe we will be using for the build: ${RECIPE_NAME}"
       - |
         su secous -c "
         repo init -u ${CI_REPOSITORY_URL} -b ${BUILD_BRANCH}; 
@@ -257,6 +259,8 @@ retrigger:
  script:
       - BASE_DIRECTORY=$PWD
       - echo "Deploying packages..."
+      - echo "This is the board for which the build has been performed... ${BOARD}"
+      - echo "This is the recipe name associated to that build... ${RECIPE_NAME}"
       - ART_PATH=$(cat pathname.txt)
       - DEPLOY_DATE=$(date +%Y%m%d)
       - |
-- 
GitLab