aboutsummaryrefslogtreecommitdiff
path: root/lt-qcom-debian-images/builders-fai.sh
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2018-09-11 19:29:32 +0200
committerNicolas Dechesne <nicolas.dechesne@linaro.org>2018-09-11 19:30:20 +0200
commit1098b2fba6360513c1b9c5ec3c81bdbfc6cf34eb (patch)
tree00acdc167c28a330e209fb76ecfd71dab9090f5d /lt-qcom-debian-images/builders-fai.sh
parentfe9ff41bce8bf826c85446737d7128ddd9726465 (diff)
lt-qcom-debian-images: record build changes in lt-ci git tree
Keep track of job history by archiving some key build artifact in a build history tree. Change-Id: I2b2f537fc86aa7875db90c437ca6102196b5912f Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Diffstat (limited to 'lt-qcom-debian-images/builders-fai.sh')
-rw-r--r--lt-qcom-debian-images/builders-fai.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/lt-qcom-debian-images/builders-fai.sh b/lt-qcom-debian-images/builders-fai.sh
index cf2c6e25ca..88d62a5995 100644
--- a/lt-qcom-debian-images/builders-fai.sh
+++ b/lt-qcom-debian-images/builders-fai.sh
@@ -16,6 +16,19 @@ fi
set -ex
+# Needed to use git commit/push on CI
+git config --global user.name "Linaro CI"
+git config --global user.email "ci_notify@linaro.org"
+git config --global core.sshCommand "ssh -F ${HOME}/qcom.sshconfig"
+
+cat << EOF > ${HOME}/qcom.sshconfig
+Host git.linaro.org
+ User git
+ UserKnownHostsFile /dev/null
+ StrictHostKeyChecking no
+EOF
+chmod 0600 ${HOME}/qcom.sshconfig
+
# Build information
mkdir -p out
cat > out/HEADER.textile << EOF
@@ -34,6 +47,9 @@ sudo mount -t tmpfs tmpfs /tmp
# dumb utility to parse dpkg -l output
wget https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/lt-qcom-debian-images/debpkgdiff.py
+# Record build log changes in git tree
+git clone ssh://git.linaro.org/landing-teams/working/qualcomm/lt-ci.git -b debian/${PLATFORM_NAME}
+
for rootfs in ${ROOTFS}; do
rootfs_sz=$(echo $rootfs | cut -f2 -d,)
@@ -80,6 +96,9 @@ for rootfs in ${ROOTFS}; do
echo "latest build published does not have packages list, skipping diff report"
fi
+ # record list of installed packages in git
+ cp out/${VENDOR}-${OS_FLAVOUR}-${rootfs}-${PLATFORM_NAME}-${BUILD_NUMBER}.packages lt-ci/${VENDOR}-${OS_FLAVOUR}-${rootfs}.packages
+
cat >> out/HEADER.textile << EOF
* Linaro Debian ${rootfs}: size: ${rootfs_sz_real}
EOF
@@ -98,6 +117,9 @@ else
echo "latest build published does not have kernel config, skipping diff report"
fi
+# record kernel config changes in git
+cp out/config-* lt-ci/config
+
# the space after pre.. tag is on purpose
if [ -f out/build-changes.txt ]; then
cat > out/README.textile << EOF
@@ -119,6 +141,13 @@ cat >> out/HEADER.textile << EOF
* Kernel package version: ${kernel_pkgver}
EOF
+# Commit build changes in lt-ci
+cd lt-ci
+git add -A
+git commit --allow-empty -m "Import build ${BUILD_NUMBER}"
+git push origin debian/${PLATFORM_NAME}
+cd ..
+
# Create boot image
cat out/vmlinuz-* out/$(basename ${DTBS}) > Image.gz+dtb
mkbootimg \