diff --git a/build-pipeline-yocto.yml.jinja2 b/build-pipeline-yocto.yml.jinja2
index 41c88de51381c34686a46be8e3a5f2f6cbb7f1ba..11626f25a87a63bf12a1b1b2350c7d8abadff5b8 100644
--- a/build-pipeline-yocto.yml.jinja2
+++ b/build-pipeline-yocto.yml.jinja2
@@ -33,6 +33,12 @@ variables:
 changelog:
   extends: .changelog
 
+build-version:
+  extends: .build_version
+  variables:
+    # We have to set a machine, even if it is not actually needed for what the job does,
+    # so we just choose the first.
+    MACHINE: {{ MACHINES.split(' ')[0] }}
 
 # --------------------------------------------------------------------------------------
 # Generated jobs
diff --git a/build-pipeline.yml b/build-pipeline.yml
index 8931d9c79e681ea32f8d8652a763c542e94958f6..3b7dd8925f4c5fb85ec5c832b9d812cc95e75808 100644
--- a/build-pipeline.yml
+++ b/build-pipeline.yml
@@ -96,16 +96,16 @@ workflow:
       fi
     fi
 
-.build_script: &build_script
-  # setup build environment
+.setup_build: &setup_build
   - echo "Build configuration MACHINE=${MACHINE}
       DISTRO=${YOCTO_DISTRO} IMAGE=${YOCTO_IMAGE}"
   - echo "Using build dir ${BUILD_PATH}"
   - export MACHINE="${MACHINE}"
   - export DISTRO="${YOCTO_DISTRO}"
   - export EULA="1"
-  - source ./"${SETUP_SCRIPT}" "${BUILD_PATH}"
-  # start build
+  - source "${SETUP_SCRIPT}" "${BUILD_PATH}"
+
+.run_build: &run_build
   - echo -e "section_start:`date +%s`:bitbake_run\r\e[0KBitbake Log"
   - echo "bitbake ${YOCTO_IMAGE} -c ${BITBAKE_TASK}"
   - bitbake "${YOCTO_IMAGE}" -c "${BITBAKE_TASK}"
@@ -140,6 +140,42 @@ workflow:
     paths:
       - "changelog.md"
 
+.build_version:
+  extends:
+    - .build_yocto
+  stage: Infrastructure
+  tags:
+    - infrastructure
+  needs: []
+  variables:
+    BITBAKE_ENV_COMMAND: bitbake "${YOCTO_IMAGE}" -e
+    # RELEASE_VERSION and RELEASE_NAME are eval'ed before saving them to version.env,
+    # so we can use deferred variable expansion or even command execution to construct
+    # their values.
+    RELEASE_VERSION: $${DISTRO_VERSION}
+    RELEASE_NAME: Yocto-${RELEASE_VERSION}
+  script:
+    # Extract all variable assignments from the BitBake environment and source them.
+    # The rather complicated regex also regards values containing escaped quotes.
+    - ${BITBAKE_ENV_COMMAND}
+    - set -a
+    - source <( ${BITBAKE_ENV_COMMAND} | egrep '^[A-Z]\w*="([^\\"]+|\\.)*"$' )
+    - set +a
+    - echo "${DISTRO_VERSION}"
+    - echo "${RELEASE_VERSION}"
+    - echo "${RELEASE_NAME}"
+    - RELEASE_VERSION=$(eval echo "${RELEASE_VERSION}")
+    - RELEASE_NAME=$(eval echo "${RELEASE_NAME}")
+    - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> version.env
+    - echo "RELEASE_NAME=${RELEASE_NAME}" >> version.env
+    - cat version.env
+  artifacts:
+    expire_in: 1 week
+    reports:
+      dotenv: version.env
+    paths: []
+  cache: []
+
 # --------------------------------------------------------------------------------------
 # Stage: build
 # --------------------------------------------------------------------------------------
@@ -220,9 +256,10 @@ workflow:
     - *docker_check
     - *setup_ssh
     - *repo_checkout
+    - *setup_build
   script:
+    - *run_build
     - *save_build_env
-    - *build_script
     - *collect_srcrevs
     - *dump_install_command
 
diff --git a/manifest-pipeline-ci-test.yml b/manifest-pipeline-ci-test.yml
index 362c2b4a064dd250a95d030fc99d6e1fec1644c7..bdf3651ffd3095b936e7a7227c7277d9b89d11fc 100644
--- a/manifest-pipeline-ci-test.yml
+++ b/manifest-pipeline-ci-test.yml
@@ -68,10 +68,12 @@ yocto-simulation-pipeline:
     - .build-pipeline
     - .yocto-deploy
   variables:
+    BITBAKE_ENV_COMMAND: echo 'DISTRO_VERSION="kirkstone-7.0"'
     BUILD_ARTIFACTS_PREFIX: >-
       https://git.seco.com/seco-ne/yocto/manifest/-/jobs/artifacts/kirkstone/7.0/download?job=build
     YOCTO_IMAGE: seconorth-image
     YOCTO_DISTRO: seconorth-wayland
+    SETUP_SCRIPT: /dev/null
     INSTALL_SCRIPT: fng-install.sh
     ARTIFACTS_PATH: build-*/tmp/deploy/images/**/*
     PACKAGE_TYPE: image
diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml
index 7dd54297409e12210fe5a3fc1c9a1cee5ebf1427..80daac040478bf80defd95039b9c4140738574d8 100644
--- a/manifest-pipeline-yocto.yml
+++ b/manifest-pipeline-yocto.yml
@@ -96,6 +96,8 @@ fngsystem-pipeline:
     YOCTO_IMAGE: fngsystem-image
     YOCTO_DISTRO: guf-fngsystem
     INSTALL_SCRIPT: fngsystem-self-update.sh
+    RELEASE_VERSION: $$(echo $$DISTRO_VERSION | sed "s/fngsystem//")
+    RELEASE_NAME: FNGSystem-${RELEASE_VERSION}
     ARTIFACTS_PATH: build-*/tmp/deploy/images/**/*
     PACKAGE_TYPE: image
     ALPHAPLAN_STAGE: "true"