summaryrefslogtreecommitdiffstats
path: root/jjb/sandbox/yardstick.sh
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-07-07 22:12:31 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-07-07 22:31:46 +0200
commita413d814e9ee01e248b6422837cdd59b7947bcbb (patch)
tree51e9b604bc470c04b7d56dfa39d08809c9353553 /jjb/sandbox/yardstick.sh
parent43826ac925baab281a77e76f917bcadb978c9a52 (diff)
sandbox: Create daily and weekly jobs
Change-Id: I366332922a91b1e957ba104fe8d5cee07398787d Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/sandbox/yardstick.sh')
-rwxr-xr-xjjb/sandbox/yardstick.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/jjb/sandbox/yardstick.sh b/jjb/sandbox/yardstick.sh
new file mode 100755
index 000000000..2f9be2729
--- /dev/null
+++ b/jjb/sandbox/yardstick.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+#set -o errexit
+#set -o nounset
+#set -o pipefail
+
+# get the job type
+# we only support verify, merge, daily and weekly jobs
+if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
+ JOB_TYPE=${BASH_REMATCH[0]}
+else
+ echo "Unable to determine job type!"
+ exit 1
+fi
+
+# do stuff differently based on the job type
+case "$JOB_TYPE" in
+ verify)
+ echo "Running as part of verify job"
+ ;;
+ merge)
+ echo "Running as part of merge job"
+ ;;
+ daily)
+ echo "Running as part of daily job"
+ ;;
+ weekly)
+ echo "Running as part of weekly job"
+ ;;
+ *)
+ echo "Job type $JOB_TYPE is not supported!"
+ exit 1
+esac
+
+# this just shows we can get the patch/commit information
+# no matter what job we are executed by
+cd $WORKSPACE
+echo
+echo "Commit Message is"
+echo "-------------------------------------"
+git log --format=%B -n 1 $(git rev-parse HEAD)
+echo "-------------------------------------"
+echo
+echo "Repo contents"
+echo "-------------------------------------"
+ls -al
+echo "-------------------------------------"
+echo
+echo "Changed files are"
+echo "-------------------------------------"
+git diff origin/master --name-only
+echo "-------------------------------------"
+echo
+echo "Change introduced"
+echo "-------------------------------------"
+git diff origin/master
+echo "-------------------------------------"
+echo
+echo "git show"
+echo "-------------------------------------"
+git show
+echo "-------------------------------------"