Skip to content
Snippets Groups Projects
Commit 3b974a49 authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[PACKAGE DEPLOY] Insert U-Boot and Kernel deploy in Embedded image

parent f05f9332
No related branches found
No related tags found
No related merge requests found
...@@ -318,8 +318,33 @@ retrigger: ...@@ -318,8 +318,33 @@ retrigger:
bundle_filename="seco_"$PROCESSOR"_"$BOARD"_edgehog-bundle_"$KERNEL"_"$TAG_NAME"_"$DEPLOY_DATE".raucb" 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" bundle_filename_latest="seco_"$PROCESSOR"_"$BOARD"_edgehog-bundle_"$KERNEL"_"$TAG_NAME"_latest.raucb"
if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then
case none in
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";; *${UBOOT_FILE}*) echo "Not deploying U-Boot for this board since not present";;
* ) * )
echo "##################################################################" echo "##################################################################"
...@@ -351,9 +376,9 @@ retrigger: ...@@ -351,9 +376,9 @@ retrigger:
--overwrite --overwrite
fi fi
echo "Finishing U-Boot upload";; 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";; *${KERNEL_FILE}*) echo "Not deploying Kernel for this board since not present";;
* ) * )
echo "##################################################################" echo "##################################################################"
...@@ -396,31 +421,7 @@ retrigger: ...@@ -396,31 +421,7 @@ retrigger:
--overwrite --overwrite
fi fi
echo "Finishing Kernel upload";; echo "Finishing Kernel upload";;
esac 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
echo "##################################################################" echo "##################################################################"
echo "###################### FILESYSTEM ##############################" echo "###################### FILESYSTEM ##############################"
...@@ -535,42 +536,39 @@ retrigger: ...@@ -535,42 +536,39 @@ retrigger:
if [ "$CI_JOB_STATUS" == "success" ]; then if [ "$CI_JOB_STATUS" == "success" ]; then
if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; 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 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 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/$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/$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 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 [ ! -n "$CI_COMMIT_TAG" ]; then
if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; 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 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 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/$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/$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 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment