aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-03-16 16:00:29 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2021-03-16 16:00:29 +0000
commit0eb315eba9771cb178158e022f4707402bd82221 (patch)
treef8dd273dbe87cc3eea1540b6e98948f633ad4adb
parent6719b1fe96fda398102f04ca438e8a74f73f679d (diff)
parent49327a3679e3fad395fc42cff14691364290d568 (diff)
Merge "SPEC-3414: generate BUILD_VERSION early"
-rw-r--r--jjb/common/include-agl-app-run-test-short.sh7
-rw-r--r--jjb/common/include-agl-run-test-short-release.sh7
-rw-r--r--jjb/common/include-agl-run-test-short.sh14
3 files changed, 19 insertions, 9 deletions
diff --git a/jjb/common/include-agl-app-run-test-short.sh b/jjb/common/include-agl-app-run-test-short.sh
index 239e2baf..e1bd6998 100644
--- a/jjb/common/include-agl-app-run-test-short.sh
+++ b/jjb/common/include-agl-app-run-test-short.sh
@@ -10,6 +10,9 @@
cd $REPODIR
+BUILD_VERSION="AGL-app-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER"
+[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)"
+
echo "# LAVA lab target: ${LAVA_LAB} #"
# releng-scripts depends on jinja2 >= 2.9
echo "## Check version of python-jinja2: "
@@ -34,12 +37,12 @@ CREATE_ARGS+="--build-type snapshot --branch master --version latest "
[[ ! -z $GERRIT_CHANGE_NUMBER ]] && CREATE_ARGS+="--app-changeid $GERRIT_CHANGE_NUMBER "
[[ ! -z $GERRIT_PATCHSET_NUMBER ]] && CREATE_ARGS+="--app-patchset $GERRIT_PATCHSET_NUMBER "
[[ ! -z $AGLBRANCH ]] && CREATE_ARGS+="--app-branch $AGLBRANCH "
-BUILD_VERSION="AGL-app-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER"
-[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)"
CREATE_ARGS+="--name AGL-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER "
CREATE_ARGS+="--build-version $BUILD_VERSION "
CREATE_ARGS+="--callback-from ${LAVA_LAB} "
CREATE_ARGS+="--test application-lifecycle pyagl"
+
+echo "DEBUG: call create-jobs.py with $CREATE_ARGS"
$RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml
if [ $? != 0 ]; then
diff --git a/jjb/common/include-agl-run-test-short-release.sh b/jjb/common/include-agl-run-test-short-release.sh
index 53011b50..7b13784e 100644
--- a/jjb/common/include-agl-run-test-short-release.sh
+++ b/jjb/common/include-agl-run-test-short-release.sh
@@ -9,6 +9,9 @@
cd $REPODIR
+BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION"
+[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)"
+
echo "# LAVA lab target: ${LAVA_LAB} #"
# releng-scripts depends on jinja2 >= 2.9
echo "## Check version of python-jinja2: "
@@ -18,11 +21,11 @@ CREATE_ARGS+="--machine ${releng_device} "
CREATE_ARGS+="--build-type release "
[[ ! -z $RELEASE_BRANCH ]] && CREATE_ARGS+="--branch $RELEASE_BRANCH "
[[ ! -z $RELEASE_VERSION ]] && CREATE_ARGS+="--version $RELEASE_VERSION "
-BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION"
-[[ -e output/repo-manifest-r.txt.sha1 ]] && BUILD_VERSION+="-$(cat output/repo-manifest-r.txt.sha1)"
CREATE_ARGS+="--name AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION "
CREATE_ARGS+="--build-version $BUILD_VERSION "
CREATE_ARGS+="--callback-from ${LAVA_LAB} "
+
+echo "DEBUG: call create-jobs.py with $CREATE_ARGS"
$RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml
if [ $? != 0 ]; then
diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh
index 92a38140..09e2509b 100644
--- a/jjb/common/include-agl-run-test-short.sh
+++ b/jjb/common/include-agl-run-test-short.sh
@@ -18,6 +18,13 @@ if [ -e build-info ]; then
source build-info
fi
+BUILD_VERSION=""
+if [[ ! -z $DIST_BUILD_TOPIC ]]; then
+ BUILD_VERSION="$DIST_BUILD_TOPIC"
+else
+ [[ ! -z $DIST_BB_DISTRO_VERSION ]] && BUILD_VERSION="$DIST_BB_DISTRO_VERSION-${DIST_LAYERS_MD5:0:8}"
+fi
+
echo "# LAVA lab target: ${LAVA_LAB} #"
# releng-scripts depends on jinja2 >= 2.9
echo "## Check version of python-jinja2: "
@@ -28,11 +35,7 @@ CREATE_ARGS+="--build-type ci "
[[ ! -z $GERRIT_CHANGE_NUMBER ]] && CREATE_ARGS+="--changeid $GERRIT_CHANGE_NUMBER "
[[ ! -z $GERRIT_PATCHSET_NUMBER ]] && CREATE_ARGS+="--patchset $GERRIT_PATCHSET_NUMBER "
CREATE_ARGS+="--name AGL-gerrit-$GERRIT_CHANGE_NUMBER-$GERRIT_PATCHSET_NUMBER "
-if [[ ! -z $DIST_BUILD_TOPIC ]]; then
- CREATE_ARGS+="--build-version $DIST_BUILD_TOPIC "
-else
- [[ ! -z $DIST_BB_DISTRO_VERSION ]] && CREATE_ARGS+="--build-version $DIST_BB_DISTRO_VERSION-${DIST_LAYERS_MD5:0:8} "
-fi
+[[ ! -z "$BUILD_VERSION" ]] && CREATE_ARGS+="--build-version $BUILD_VERSION"
[[ ! -z $DIST_BUILD_HASH ]] && CREATE_ARGS+="--commit $DIST_BUILD_HASH "
[[ ! -z $DIST_BUILD_ID ]] && CREATE_ARGS+="--build-id $DIST_BUILD_ID "
[[ ! -z $DIST_BB_AGL_BRANCH ]] && CREATE_ARGS+="--branch $DIST_BB_AGL_BRANCH "
@@ -41,6 +44,7 @@ CREATE_ARGS+="--callback-from ${LAVA_LAB} "
if [[ ! -z $lavacli_tags ]]; then
CREATE_ARGS+="--device-tags ${lavacli_tags} "
fi
+echo "DEBUG: call create-jobs.py with $CREATE_ARGS"
$RELENG/utils/create-jobs.py ${CREATE_ARGS} > testjob.yaml
if [ $? != 0 ]; then