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

[FS DEPLOY] Insert fs deploy to Azure

* Change "edgehog-base-image" label to "edgehog-things-image" one
* Fix on intel_apl config file
* Fix on AZURE_PATH variable (the edgehog folder is necessary
for the public container release)
parent 1d3edf2f
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ deploy-edgehog-a62:
UBOOT_FILE: u-boot.imx
KERNEL_FILE: zImage
AZURE_PATH: imx6/a62
IMAGE_NAME: edgehog-base-image
IMAGE_NAME: edgehog-things-image
#############################
### EDGEHOG EMBEDDED BASE ###
......
......@@ -21,7 +21,7 @@ deploy-edgehog-c20:
UBOOT_FILE: u-boot.bin
KERNEL_FILE: Image
AZURE_PATH: imx8/c20
IMAGE_NAME: edgehog-base-image
IMAGE_NAME: edgehog-things-image
#############################
### EDGEHOG EMBEDDED BASE ###
......
......@@ -21,7 +21,7 @@ deploy-edgehog-c31:
UBOOT_FILE: uboot.img
KERNEL_FILE: Image
AZURE_PATH: rockchip/c31
IMAGE_NAME: edgehog-base-image
IMAGE_NAME: edgehog-things-image
#############################
### EDGEHOG EMBEDDED BASE ###
......
########################
#### EDGEHOG THINGS ####
########################
build-edgehog-intel-apl:
extends: .build
variables: &build-edgehog-intel-apl
......@@ -16,4 +20,5 @@ deploy-edgehog-intel-apl:
<<: *build-edgehog-intel-apl
UBOOT_FILE: none
KERNEL_FILE: none
AZURE_PATH: apollolake/Yocto
\ No newline at end of file
AZURE_PATH: apollolake/Yocto
IMAGE_NAME: edgehog-things-image
\ No newline at end of file
......@@ -21,7 +21,7 @@ deploy-edgehog-tanaro:
UBOOT_FILE: u-boot.bin
KERNEL_FILE: Image
AZURE_PATH: imx8/tanaro
IMAGE_NAME: edgehog-base-image
IMAGE_NAME: edgehog-things-image
#############################
### EDGEHOG EMBEDDED BASE ###
......
......@@ -264,6 +264,7 @@ retrigger:
TAG_NAME=${CI_COMMIT_TAG}
AZURE_STORAGE_SAS_TOKEN="${AZURE_STORAGE_PUBLIC_SAS_TOKEN}"
AZURE_CONTAINER_NAME="${AZURE_PUBLIC_CONTAINER_NAME}"
AZURE_PATH="${AZURE_PATH}/edgehog"
fi
- |
uboot_filename="seco_"$PROCESSOR"_"$BOARD"_uboot_"$KERNEL"_"$TAG_NAME"_"$DEPLOY_DATE".tar.gz"
......@@ -359,27 +360,27 @@ retrigger:
echo "Finishing Kernel upload";;
esac
# echo "##################################################################"
# echo "###################### FILESYSTEM ##############################"
# echo "##################################################################"
# find $BASE_DIRECTORY/$ART_PATH -iname *."$FS_EXTENSION" \
# -exec cp -L {} $BASE_DIRECTORY/filesystemTMP.tar.bz2 \;
# mv filesystemTMP.tar.bz2 $BASE_DIRECTORY/$filesystem_name
# az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
# --sas-token $AZURE_STORAGE_SAS_TOKEN \
# --container-name $AZURE_CONTAINER_NAME \
# --file $BASE_DIRECTORY/$filesystem_name \
# --name $AZURE_PATH/$TAG_NAME/$filesystem_name \
# --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/$filesystem_name \
# --name $AZURE_PATH/$TAG_NAME/$filesystem_name_latest \
# --overwrite
# fi
echo "##################################################################"
echo "###################### FILESYSTEM ##############################"
echo "##################################################################"
find $BASE_DIRECTORY/$ART_PATH -iname *."$FS_EXTENSION" \
-exec cp -L {} $BASE_DIRECTORY/filesystemTMP.tar.bz2 \;
mv filesystemTMP.tar.bz2 $BASE_DIRECTORY/$filesystem_name
az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \
--sas-token $AZURE_STORAGE_SAS_TOKEN \
--container-name $AZURE_CONTAINER_NAME \
--file $BASE_DIRECTORY/$filesystem_name \
--name $AZURE_PATH/$TAG_NAME/$filesystem_name \
--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/$filesystem_name \
--name $AZURE_PATH/$TAG_NAME/$filesystem_name_latest \
--overwrite
fi
echo "##################################################################"
echo "####################### BUNDLE FILE ############################"
......@@ -467,6 +468,7 @@ retrigger:
TAG_NAME=${CI_COMMIT_TAG}
AZURE_STORAGE_SAS_TOKEN="${AZURE_STORAGE_PUBLIC_SAS_TOKEN}"
AZURE_CONTAINER_NAME="${AZURE_PUBLIC_CONTAINER_NAME}"
AZURE_PATH="${AZURE_PATH}/edgehog"
fi
echo "##################################################################" >> Link_report_$BOARD.txt
......@@ -488,20 +490,24 @@ retrigger:
bundle_filename_latest="seco_"$PROCESSOR"_"$BOARD"_edgehog-bundle_"$KERNEL"_"$TAG_NAME"_latest.raucb"
if [ "$CI_JOB_STATUS" == "success" ]; then
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$uboot_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$kernel_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
# echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$filesystem_name) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$uboot_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$kernel_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bundle_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
fi
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$filesystem_name) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$image_name) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bmap_name) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bundle_filename) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
if [ ! -n "$CI_COMMIT_TAG" ]; then
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$uboot_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$kernel_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
# echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$filesystem_name_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
if [[ "${CI_JOB_NAME}" != *"embedded"* ]]; then
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$uboot_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$kernel_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bundle_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
fi
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$filesystem_name_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$image_name_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bmap_name_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
echo -e $(az storage blob url --container-name $AZURE_CONTAINER_NAME --name $AZURE_PATH/$TAG_NAME/$bundle_filename_latest) | sed -E 's/\?s.*//' >> Link_report_$BOARD.txt
fi
else
echo -e "JOBS FAILED" >> Link_report_$BOARD.txt
......@@ -630,6 +636,8 @@ release:
- if: $CI_COMMIT_TAG
script:
- |
cat Link_report.txt
cat changelog_link.txt
rm -rf release.sh
echo "#!/bin/bash" >> release.sh
echo "" >> release.sh
......
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