diff --git a/boards/.intel_apl.yml b/boards/.intel_apl.yml new file mode 100644 index 0000000000000000000000000000000000000000..b5e1602c05e004226159c79271833981718233db --- /dev/null +++ b/boards/.intel_apl.yml @@ -0,0 +1,19 @@ +build-edgehog-intel-apl: + extends: .build + variables: &build-edgehog-intel-apl + BOARD: apollolake + PROCESSOR: intel + BUILD_DIRECTORY: build_intel + MACHINE: seco-intel-apl + DEFCONFIG_FILE: seco_intel_apl_edgehog + +deploy-edgehog-intel-apl: + extends: .deploy + needs: + - job: build-edgehog-intel-apl + artifacts: true + variables: &deploy-edgehog-intel-apl + <<: *build-edgehog-intel-apl + UBOOT_FILE: none + KERNEL_FILE: none + AZURE_PATH: apollolake/Yocto \ No newline at end of file diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml index 9c626e1e09ef864add9e28583f44b76d37573a69..ddc346dd440a03e5ed0f42be2e01aa6aca34284e 100644 --- a/manifest-pipeline-yocto.yml +++ b/manifest-pipeline-yocto.yml @@ -41,6 +41,7 @@ stages: - retrigger - build - deploy + - changelog - notify workflow: @@ -232,6 +233,21 @@ retrigger: - Job_message_$BOARD.txt allow_failure: true +############################# +####### CHANGE LOG ########## +############################# + +changelog: + extends: .infrastructure + script: .gitlab-ci/scripts/changelog_generator.py + --token=${GITBOT_TOKEN} + --branch=${MASTER_BRANCH} + > changelog.md + artifacts: + expire_in: 4 weeks + paths: + - "changelog.md" + ############################# ########## DEPLOY ########### ############################# @@ -276,74 +292,79 @@ retrigger: bmap_name_latest="seco_edgehog_"$PROCESSOR"_"$BOARD"_bmapfile_"$KERNEL"_"$TAG_NAME"_latest.rootfs.wic.bmap" bundle_filename="seco_edgehog_"$PROCESSOR"_"$BOARD"_bundle_"$KERNEL"_"$TAG_NAME"_"$DEPLOY_DATE".raucb" bundle_filename_latest="seco_edgehog_"$PROCESSOR"_"$BOARD"_bundle_"$KERNEL"_"$TAG_NAME"_latest.raucb" - - echo "##################################################################" - echo "######################## UBOOT #################################" - echo "##################################################################" - - #Compress the uboot package and create a tar.gz file - echo $ART_PATH - ls -la $ART_PATH - find $ART_PATH -iname $UBOOT_FILE -exec cp -L {} $BASE_DIRECTORY/ \; - echo "${UBOOT_FILE}" - ls -la - tar -czvf $BASE_DIRECTORY/$uboot_filename -C $BASE_DIRECTORY $UBOOT_FILE - ls -la - az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ - --sas-token $AZURE_STORAGE_SAS_TOKEN \ - --container-name $AZURE_CONTAINER_NAME \ - --file $BASE_DIRECTORY/$uboot_filename \ - --name $AZURE_PATH/$TAG_NAME/$uboot_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/$uboot_filename \ - --name $AZURE_PATH/$TAG_NAME/$uboot_filename_latest \ - --overwrite + + if [ ${UBOOT_FILE} != *none* ]; then + echo "##################################################################" + echo "##################################################################" + echo "######################## UBOOT #################################" + + #Compress the uboot package and create a tar.gz file + echo $ART_PATH + ls -la $ART_PATH + find $ART_PATH -iname $UBOOT_FILE -exec cp -L {} $BASE_DIRECTORY/ \; + echo "${UBOOT_FILE}" + ls -la + tar -czvf $BASE_DIRECTORY/$uboot_filename -C $BASE_DIRECTORY $UBOOT_FILE + ls -la + + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$uboot_filename \ + --name $AZURE_PATH/$TAG_NAME/$uboot_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/$uboot_filename \ + --name $AZURE_PATH/$TAG_NAME/$uboot_filename_latest \ + --overwrite + fi fi + + if [ ${KERNEL_FILE} != *none* ]; then + echo "##################################################################" + echo "######################## KERNEL ################################" + echo "##################################################################" + + kernel_dir="$BASE_DIRECTORY/seco-kernel-$BOARD-$PROCESSOR" + mkdir -p $kernel_dir/boot $kernel_dir/lib + + #Find all the needed kernel packages and copy them inside the proper folders + find $BASE_DIRECTORY/$ART_PATH -iname $KERNEL_FILE \ + -exec cp -L {} $kernel_dir/boot \; + find $BASE_DIRECTORY/$ART_PATH -maxdepth 2 -iname *.dtb \ + -exec cp -L {} $kernel_dir/boot \; + find $BASE_DIRECTORY/$ART_PATH -iname *.dtbo \ + -exec cp -L {} $kernel_dir/boot \; + find $BASE_DIRECTORY/$ART_PATH -iname *fw*.bin \ + -exec cp -L {} $kernel_dir/boot \; + find $BASE_DIRECTORY/$ART_PATH -iname modules-seco-*.tgz \ + -exec cp -L {} $BASE_DIRECTORY/temp_mod.tgz \; + tar -xf $BASE_DIRECTORY/temp_mod.tgz -C $kernel_dir + rm $BASE_DIRECTORY/temp_mod.tgz + + #Compress the kernel package and create a tar.gz file + tar -czvf $BASE_DIRECTORY/$kernel_filename -C $kernel_dir boot lib + rm -rf $kernel_dir + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$kernel_filename \ + --name $AZURE_PATH/$TAG_NAME/$kernel_filename \ + --overwrite - echo "##################################################################" - echo "######################## KERNEL ################################" - echo "##################################################################" - - kernel_dir="$BASE_DIRECTORY/seco-kernel-$BOARD-$PROCESSOR" - mkdir -p $kernel_dir/boot $kernel_dir/lib - - #Find all the needed kernel packages and copy them inside the proper folders - find $BASE_DIRECTORY/$ART_PATH -iname $KERNEL_FILE \ - -exec cp -L {} $kernel_dir/boot \; - find $BASE_DIRECTORY/$ART_PATH -maxdepth 2 -iname *.dtb \ - -exec cp -L {} $kernel_dir/boot \; - find $BASE_DIRECTORY/$ART_PATH -iname *.dtbo \ - -exec cp -L {} $kernel_dir/boot \; - find $BASE_DIRECTORY/$ART_PATH -iname *fw*.bin \ - -exec cp -L {} $kernel_dir/boot \; - find $BASE_DIRECTORY/$ART_PATH -iname modules-seco-*.tgz \ - -exec cp -L {} $BASE_DIRECTORY/temp_mod.tgz \; - tar -xf $BASE_DIRECTORY/temp_mod.tgz -C $kernel_dir - rm $BASE_DIRECTORY/temp_mod.tgz - - #Compress the kernel package and create a tar.gz file - tar -czvf $BASE_DIRECTORY/$kernel_filename -C $kernel_dir boot lib - rm -rf $kernel_dir - az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ - --sas-token $AZURE_STORAGE_SAS_TOKEN \ - --container-name $AZURE_CONTAINER_NAME \ - --file $BASE_DIRECTORY/$kernel_filename \ - --name $AZURE_PATH/$TAG_NAME/$kernel_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/$kernel_filename \ - --name $AZURE_PATH/$TAG_NAME/$kernel_filename_latest \ - --overwrite - fi + 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/$kernel_filename \ + --name $AZURE_PATH/$TAG_NAME/$kernel_filename_latest \ + --overwrite + fi + fi # echo "##################################################################" # echo "###################### FILESYSTEM ##############################" @@ -384,12 +405,12 @@ retrigger: --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/$image_name \ - --name $AZURE_PATH/$TAG_NAME/$image_name_latest \ - --overwrite + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$image_name \ + --name $AZURE_PATH/$TAG_NAME/$image_name_latest \ + --overwrite fi echo "################################################################" @@ -407,12 +428,12 @@ retrigger: --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/$bmap_name \ - --name $AZURE_PATH/$TAG_NAME/$bmap_name_latest \ - --overwrite + az storage blob upload --account-name $AZURE_STORAGE_ACCOUNT \ + --sas-token $AZURE_STORAGE_SAS_TOKEN \ + --container-name $AZURE_CONTAINER_NAME \ + --file $BASE_DIRECTORY/$bmap_name \ + --name $AZURE_PATH/$TAG_NAME/$bmap_name_latest \ + --overwrite fi echo "##################################################################" @@ -430,12 +451,12 @@ retrigger: --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/$TAG_NAME/$bundle_filename_latest \ - --overwrite + 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/$TAG_NAME/$bundle_filename_latest \ + --overwrite fi after_script: diff --git a/scripts/changelog_generator.py b/scripts/changelog_generator.py index 43c94f8e917aeae70539a7c5eecf8ac9401f6e4a..52538cfac8d170700a976d2d4a79024b7bbae81a 100755 --- a/scripts/changelog_generator.py +++ b/scripts/changelog_generator.py @@ -24,14 +24,18 @@ __author__ = "Jonas Höppner" __email__ = "jonas.hoeppner@garz-fricke.com" GITLAB_SERVER = "https://git.seco.com" -# ID of the guf_yocto group -GITLAB_GROUP_ID = "556" +# ID of the Edgehog yocto group +GITLAB_GROUP_ID = "479" -DISTRO_PROJECT_ID = "1748" -MACHINE_PROJECT_ID = "2074" -MANIFEST_PROJECT_ID = "1725" +# List of main repositories to collect changelog +THINGS_PROJECT_ID = "1460" +EMBEDDED_PROJECT_ID = "2449" +IMX_PROJECT_ID = "1457" +RK_PROJECT_ID = "1458" +INTEL_PROJECT_ID = "2109" +MANIFEST_PROJECT_ID = "1456" -DEFAULTBRANCH = "dunfell" +DEFAULTBRANCH = "kirkstone/develop" GITLAB_TIMEFORMAT = "%Y-%m-%dT%H:%M:%S.%f%z" TIMEFORMAT = "%Y-%m-%d %H:%M" @@ -141,10 +145,12 @@ class Release: # Adds a mergerequest to the project, but uses some filtering # Ignore automated merge requests - if m.mr.author["username"] == "guf-gitbot": - return False if m.mr.author["username"] == "gitbot": return False + # Exclude also MRs opened by a temporary access token + # from Lorenzo Pagliai + if m.mr.author["username"] == "lorenzo.pagliai": + return False # With the movement to git.seco.com the MRs owned by # the guf-gitbot have been transfered to tobias # As it is not possible to change the owner back @@ -241,12 +247,15 @@ def main(args): # Speed up, complete project lookup takes much longer # then specifying the ID directly - distro = Project(gitlab.projects.get(DISTRO_PROJECT_ID)) - machine = Project(gitlab.projects.get(MACHINE_PROJECT_ID)) + things = Project(gitlab.projects.get(THINGS_PROJECT_ID)) + embedded = Project(gitlab.projects.get(EMBEDDED_PROJECT_ID)) + imx = Project(gitlab.projects.get(IMX_PROJECT_ID)) + rk = Project(gitlab.projects.get(RK_PROJECT_ID)) + intel = Project(gitlab.projects.get(INTEL_PROJECT_ID)) manifest = Project(gitlab.projects.get(MANIFEST_PROJECT_ID)) releases = [] - for t in manifest.project.tags.list(search=options.branch): + for t in manifest.project.tags.list(): releases.append(Release(Tag(t))) # Add dummy release with date today for new untaged commits @@ -264,7 +273,7 @@ def main(args): # Sort by date, oldest first releases = sorted(releases, key=lambda d: d.tag.timestamp, reverse=False) - for p in [manifest, distro, machine]: + for p in [manifest, things, embedded, imx, rk, intel]: for mr in p.project.mergerequests.list( scope="all", state="merged", target_branch=options.branch, per_page="10000" ):