From a731b1569292fc3742fa16fc2328524ea2a93f9f Mon Sep 17 00:00:00 2001
From: Tim Jaacks <tim.jaacks@seco.com>
Date: Thu, 14 Sep 2023 15:00:20 +0200
Subject: [PATCH] Remove DISTRO_IMAGES

This variable has been removed in Yocto. Its contents have been merged
into DISTRO_RELEASE_ARTEFACTS.

See for reference:
https://git.seco.com/seco-ne/yocto/layers/meta-seconorth-distro/-/commit/a316e95e07325a22d3ee77111161ff5a42711b76
---
 build-pipeline.yml         |  7 ++-----
 scripts/package_release.py | 11 -----------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/build-pipeline.yml b/build-pipeline.yml
index f4c09c78..0a286a51 100644
--- a/build-pipeline.yml
+++ b/build-pipeline.yml
@@ -122,9 +122,8 @@ workflow:
   - echo "IMAGE_PATH=${IMAGE_PATH}" > build.env
   - echo "SDK_PATH=${SDK_PATH}" >> build.env
   - echo "LICENSES_PATH=${LICENSES_PATH}" >> build.env
-  # SDK name, artifacts and images from the BitBake environment are needed for packaging
+  # SDK name and artifacts from the BitBake environment are needed for packaging
   - echo "TOOLCHAIN_OUTPUTNAME=${TOOLCHAIN_OUTPUTNAME}" >> build.env
-  - echo "DISTRO_IMAGES='${DISTRO_IMAGES}'" >> build.env
   - echo "DISTRO_RELEASE_ARTEFACTS='${DISTRO_RELEASE_ARTEFACTS}'" >> build.env
   # Install script location is needed in test job
   - echo "FNG_INSTALL_URL=${FNG_INSTALL_URL}" >> build.env
@@ -272,9 +271,8 @@ workflow:
     # existing build.env from the cache.
     # yamllint disable-line rule:line-length
     - export TOOLCHAIN_OUTPUTNAME="seconorth-wayland-glibc-x86_64-seconorth-image-cortexa9t2hf-neon-$MACHINE-toolchain-kirkstone-7.0"
-    - export DISTRO_IMAGES="seconorth-image-$MACHINE.tar.gz"
     # yamllint disable-line rule:line-length
-    - export DISTRO_RELEASE_ARTEFACTS="seconorth-image-$MACHINE.tar.gz fng-install.sh pkg.py"
+    - export DISTRO_RELEASE_ARTEFACTS="seconorth-image-$MACHINE.tar.gz seconorth-image-$MACHINE.manifest seconorth-image-$MACHINE.testdata.json fng-install.sh pkg.py"
     - *save_build_env
   cache:
     - *cache
@@ -371,7 +369,6 @@ workflow:
         --release-version=${RELEASE_VERSION}
         --machine=${MACHINE}
         --sdk-name="${TOOLCHAIN_OUTPUTNAME}"
-        --image-artifacts="${DISTRO_IMAGES}"
         --artifacts="${DISTRO_RELEASE_ARTEFACTS}"
     - elif [[ "${PACKAGE_TYPE}" == "sdk" ]]; then
     - .gitlab-ci/scripts/package_release.py
diff --git a/scripts/package_release.py b/scripts/package_release.py
index 0be68004..ef9384f1 100755
--- a/scripts/package_release.py
+++ b/scripts/package_release.py
@@ -101,11 +101,6 @@ def main():
         help="""Name of the SDK file""",
         dest="sdk_name",
     )
-    parser.add_argument(
-        "--image-artifacts",
-        help="""Space separated list of image artifacts""",
-        dest="image_artifacts",
-    )
     parser.add_argument(
         "--artifacts",
         help="""Space separated list of artifacts""",
@@ -138,15 +133,9 @@ def main():
 
     # Package image files
     if args.images_dir is not None:
-        image_artifacts = args.image_artifacts.split() if args.image_artifacts else []
         artifacts = args.artifacts.split() if args.artifacts else []
         artifacts.append("BUILD_SRCREVS.log")
 
-        # Add some additional files to the artifacts
-        for artifact in image_artifacts:
-            artifacts.append(f"{artifact.split('.')[0]}.manifest")
-            artifacts.append(f"{artifact.split('.')[0]}.testdata.json")
-
         # Prepend path to artifacts
         artifacts = [os.path.join(args.images_dir, artifact) for artifact in artifacts]
 
-- 
GitLab