aboutsummaryrefslogtreecommitdiff
path: root/lt-qcom-linux-automerge-repo-manifest
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linaro.org>2018-05-07 13:34:26 -0500
committerAníbal Limón <anibal.limon@linaro.org>2018-05-08 15:58:48 -0500
commit8330c6266ec251004e2507de54025ae6755ebdca (patch)
tree7500acea22a76a2d009075aaf0247dff5618358d /lt-qcom-linux-automerge-repo-manifest
parentb718892c95a2d4345016f7ed91b78fc745908f1a (diff)
lt-qcom-linux-automerge-repo-manifest: Add CI job to update repo manifest
When a change is detected in the QCOM-LT configuration repo may be is need to update automerge-ci.xml repo file in order to trigger a build of automerge, the repo manifest is stored on its own branch. Change-Id: I372fe46bf739ed66eeea979914cf450288ce53cd Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Diffstat (limited to 'lt-qcom-linux-automerge-repo-manifest')
-rwxr-xr-xlt-qcom-linux-automerge-repo-manifest/builders.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/lt-qcom-linux-automerge-repo-manifest/builders.sh b/lt-qcom-linux-automerge-repo-manifest/builders.sh
new file mode 100755
index 00000000..17c53b4e
--- /dev/null
+++ b/lt-qcom-linux-automerge-repo-manifest/builders.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -ex
+
+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
+
+QCOMLT_CONFIG_PATH=${PWD}/$(basename ${QCOMLT_CONFIG_REPO_URL})
+git clone -v ${QCOMLT_CONFIG_REPO_URL} ${QCOMLT_CONFIG_PATH}
+
+cd ${QCOMLT_CONFIG_PATH}
+CURRENT_REVISION=$(git rev-parse --short HEAD)
+python ./bin/automerge2repo.py automerge-ci.conf automerge-ci.xml
+git add automerge-ci.xml
+
+git commit -s -m "automerge-ci.xml: Update based on rev ${CURRENT_REVISION}" automerge-ci.xml
+echo "Pusing new version of automerge-ci.xml to ${QCOMLT_CONFIG_REPO_URL} ${QCOMLT_CONFIG_BRANCH}..."
+git push ${QCOMLT_CONFIG_REPO_URL} master:${QCOMLT_CONFIG_BRANCH} -f
+
+exit 0