summaryrefslogtreecommitdiff
path: root/tcwg-update-tested.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-05-18 11:06:37 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-06-01 14:26:20 +0000
commite8b908e1f84cf8896b3bd9e8357144fb51a70b22 (patch)
treee4ec2ac0c1dce3c46111494f7f57fee447e6a945 /tcwg-update-tested.sh
parent394df97d1f39c6a34931a78a100d4e2bae86623a (diff)
tcwg-update-tested.sh: New script, move code from tcwg-abe-tested.yaml
Change-Id: I5e1ffde89556e5063d68d93335603006e0c81bf2
Diffstat (limited to 'tcwg-update-tested.sh')
-rw-r--r--tcwg-update-tested.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tcwg-update-tested.sh b/tcwg-update-tested.sh
new file mode 100644
index 00000000..640494e0
--- /dev/null
+++ b/tcwg-update-tested.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -ef -o pipefail
+
+. $(dirname $0)/jenkins-helpers.sh
+convert_args_to_variables "$@"
+
+# Make shellcheck happy and workaround Jenkins not defining variables
+# for empty arguments.
+GIT_COMMIT="${GIT_COMMIT:-HEAD}"
+GIT_COMMIT_1="${GIT_COMMIT_1:-HEAD}"
+verbose="${verbose:-true}"
+
+# Jenkins doesn't define variables when parameter value is empty,
+# so enable "set -u" only after above binding of variables.
+set -u
+
+if $verbose; then set -x; fi
+
+git config --global user.name "TCWG Buildslave"
+git config --global user.email tcwg-buildslave@linaro.org
+git -C abe push gerrit $GIT_COMMIT:refs/heads/tested
+git -C jenkins-scripts push gerrit $GIT_COMMIT_1:refs/heads/tested