From df71c6b9edb403081f360ce649266dfa01a5da66 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 31 Mar 2015 08:56:40 -0700 Subject: [PATCH] Script to trigger jenkins test Summary: After you run `arc diff`, just run `build_tools/trigger_jenkins_test.sh` and Jenkins will test your diff! Test Plan: Triggered a build to jenkins Reviewers: sdong, rven, IslamAbdelRahman, anthony, yhchiang, meyering Reviewed By: meyering Subscribers: meyering, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36021 --- build_tools/trigger_jenkins_test.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build_tools/trigger_jenkins_test.sh diff --git a/build_tools/trigger_jenkins_test.sh b/build_tools/trigger_jenkins_test.sh new file mode 100755 index 000000000..52658f9d2 --- /dev/null +++ b/build_tools/trigger_jenkins_test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# usage: +# * trigger_jenkins_test.sh -- without parameters, submits the current patch to Jenkins for testing +# * trigger_jenkins_test.sh D12345 -- submits diff D12345 +if [[ $# == 0 ]]; then + diff=$(git log -1 --pretty=%b | perl -nle \ + 'm!^Differential Revision: https://reviews\.facebook\.net/(D\d+)$! and print $1') +else + diff=$1 +fi + +diff_len=`expr length "$diff"` +if [[ $diff_len < 6 ]] ; then + echo "I don't think your diff ID ($diff) is correct" + exit 1 +fi + +echo "Submitting build of diff $diff to Jenkins" +curl "https://ci-builds.fb.com/view/rocksdb/job/rocksdb_diff_check/buildWithParameters?token=AUTH&DIFF=$diff"