diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml index 6ff1c75816b23af1b94c7c0ccc9aeea6ce0cdda8..0ccfc297bb23090b5ce804dde58e86d415cc2838 100644 --- a/manifest-pipeline-yocto.yml +++ b/manifest-pipeline-yocto.yml @@ -318,8 +318,33 @@ retrigger: bundle_filename="seco_"$PROCESSOR"_"$BOARD"_edgehog-bundle_"$KERNEL"_"$TAG_NAME"_"$DEPLOY_DATE".raucb" bundle_filename_latest="seco_"$PROCESSOR"_"$BOARD"_edgehog-bundle_"$KERNEL"_"$TAG_NAME"_latest.raucb" - if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then - case none in + if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then + + echo "##################################################################" + echo "####################### BUNDLE FILE ############################" + echo "##################################################################" + + #Copy the bundle file and rename it + find $ART_PATH -iname *"$MACHINE.raucb" -exec cp -L {} $BASE_DIRECTORY/ \; + mv *raucb $BASE_DIRECTORY/$bundle_filename + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$bundle_filename \ + --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename \ + --overwrite + + if [ ! -n "$CI_COMMIT_TAG" ]; then + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$bundle_filename \ + --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename_latest \ + --overwrite + fi + fi + + case none in *${UBOOT_FILE}*) echo "Not deploying U-Boot for this board since not present";; * ) echo "##################################################################" @@ -351,9 +376,9 @@ retrigger: --overwrite fi echo "Finishing U-Boot upload";; - esac + esac - case none in + case none in *${KERNEL_FILE}*) echo "Not deploying Kernel for this board since not present";; * ) echo "##################################################################" @@ -396,31 +421,7 @@ retrigger: --overwrite fi echo "Finishing Kernel upload";; - esac - - echo "##################################################################" - echo "####################### BUNDLE FILE ############################" - echo "##################################################################" - - #Copy the bundle file and rename it - find $ART_PATH -iname *"$MACHINE.raucb" -exec cp -L {} $BASE_DIRECTORY/ \; - mv *raucb $BASE_DIRECTORY/$bundle_filename - az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ - --sas-token $AZURE_STORAGE_SAS_TOKEN \ - --container-name $AZURE_CONTAINER_NAME \ - --file $BASE_DIRECTORY/$bundle_filename \ - --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename \ - --overwrite - - if [ ! -n "$CI_COMMIT_TAG" ]; then - az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ - --sas-token $AZURE_STORAGE_SAS_TOKEN \ - --container-name $AZURE_CONTAINER_NAME \ - --file $BASE_DIRECTORY/$bundle_filename \ - --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename_latest \ - --overwrite - fi - fi + esac echo "##################################################################" echo "###################### FILESYSTEM ##############################" @@ -535,42 +536,39 @@ retrigger: if [ "$CI_JOB_STATUS" == "success" ]; then if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then - - case none in - *${UBOOT_FILE}*) echo "Not deployed U-Boot for this board since not present";; - * ) - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; - esac - - case none in - *${KERNEL_FILE}*) echo "Not deployed Kernel for this board since not present";; - * ) - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$kernel_filename) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; - esac - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt fi + case none in + *${UBOOT_FILE}*) echo "Not deployed U-Boot for this board since not present";; + * ) + echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; + esac + + case none in + *${KERNEL_FILE}*) echo "Not deployed Kernel for this board since not present";; + * ) + echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$kernel_filename) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; + esac echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$filesystem_name) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$image_name) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$bmap_name) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt if [ ! -n "$CI_COMMIT_TAG" ]; then if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then - - case none in - *${UBOOT_FILE}*) echo "Not deployed U-Boot for this board since not present";; - * ) - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; - esac - - case none in - *${KERNEL_FILE}*) echo "Not deployed Kernel for this board since not present";; - * ) - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$kernel_filename_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; - esac - echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$bundle_filename_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt fi + + case none in + *${UBOOT_FILE}*) echo "Not deployed U-Boot for this board since not present";; + * ) + echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$uboot_filename_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; + esac + + case none in + *${KERNEL_FILE}*) echo "Not deployed Kernel for this board since not present";; + * ) + echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$kernel_filename_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt;; + esac echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$filesystem_name_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$image_name_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$DEPLOY_PATH/$bmap_name_latest) | sed -E 's/\?s.*//' >> Link_report_"$BOARD"_"$IMAGE_NAME".txt