From 7fcb2de36f40171d79c6c9d3191eafaeec59c0a6 Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Mon, 8 Mar 2021 09:30:41 +0000 Subject: Add a script for publishing bmeta to kernelci Add a function to generate and publish bmeta.json for kernelci. Nothing is done yet, only debug to be sure correct informations are generated. Bug-AGL: SPEC-3414 Change-Id: Ic605034fecf751aa2a768557c4c8cd28d6bf5154 Signed-off-by: Corentin LABBE --- jjb/ci-AGL-verify/ci-platform-jjb.yaml | 1 + jjb/ci-apps-verify/ci-apps-jjb.yaml | 1 + jjb/common/include-agl-kci-publish-build-meta.sh | 32 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 jjb/common/include-agl-kci-publish-build-meta.sh (limited to 'jjb') diff --git a/jjb/ci-AGL-verify/ci-platform-jjb.yaml b/jjb/ci-AGL-verify/ci-platform-jjb.yaml index 333fbe98..9be531d7 100644 --- a/jjb/ci-AGL-verify/ci-platform-jjb.yaml +++ b/jjb/ci-AGL-verify/ci-platform-jjb.yaml @@ -331,6 +331,7 @@ - ../common/include-agl-run-test-prepare.sh - ../common/include-agl-run-test-rsync-changeid.sh - ../common/include-agl-setup-and-bitbake-ivi-image.sh + - ../common/include-agl-kci-publish-build-meta.sh - conditional-step: condition-kind: always steps: diff --git a/jjb/ci-apps-verify/ci-apps-jjb.yaml b/jjb/ci-apps-verify/ci-apps-jjb.yaml index 90831418..cf637e00 100644 --- a/jjb/ci-apps-verify/ci-apps-jjb.yaml +++ b/jjb/ci-apps-verify/ci-apps-jjb.yaml @@ -198,6 +198,7 @@ - ../common/include-apps-header.sh - ../common/include-apps-fetch-install-sdk.sh - ../common/include-apps-build-app.sh + - ../common/include-agl-kci-publish-build-meta.sh - ../common/include-apps-prepare-upload-folder.sh - ../common/include-apps-rsync-download-changeid.sh - conditional-step: diff --git a/jjb/common/include-agl-kci-publish-build-meta.sh b/jjb/common/include-agl-kci-publish-build-meta.sh new file mode 100644 index 00000000..da36d4c7 --- /dev/null +++ b/jjb/common/include-agl-kci-publish-build-meta.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +echo "\n\n\n" +echo "#########################################" +echo "\n\n\n" + +kci-publish() { + # check GERRIT_PROJECT to find if we build an app or not + echo $GERRIT_PROJECT |grep -q apps + if [ $? -eq 0 ];then + # for app + BUILD_VERSION="AGL-app-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER" + else + # for release + BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION" + fi + + echo "DEBUG: generate bmeta for kernelCI" + echo "DEBUG: machine ${TARGETMACHINE}" + echo "DEBUG: build_version $BUILD_VERSION" + echo "DEBUG: commit $DIST_BUILD_HASH" + echo "DEBUG: arch $TARGETARCH" + echo "DEBUG: branch $GERRIT_BRANCH" + return 0 + ./agl-publish.py --machine ${TARGETMACHINE} \ + --build_version $BUILD_VERSION \ + --commit $DIST_BUILD_HASH \ + --arch $TARGETARCH \ + --branch $GERRIT_BRANCH +} + +kci-publish -- cgit 1.2.3-korg