[ci] Print git revision of elasticsearch to ci log (elastic/elasticsearch#4782)

The output `Checked out Elasticsearch revision: ...` shows which revision of elasticsearch was included in the CI build. This makes it easier to diagnose and resolve x-pack build failures.

Original commit: elastic/x-pack-elasticsearch@8c39aafc2d
This commit is contained in:
Tim Vernum 2017-02-07 10:36:49 +11:00 committed by GitHub
parent 286d62f00e
commit 8820902f0c
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ if [ -z ${USE_EXISTING_ES:+x} ]; then
fi fi
echo "Checking out Elasticsearch '$BRANCH' branch..." echo "Checking out Elasticsearch '$BRANCH' branch..."
git clone -b $BRANCH https://github.com/elastic/elasticsearch.git --depth=1 git clone -b $BRANCH https://github.com/elastic/elasticsearch.git --depth=1
printf "Checked out Elasticsearch revision: %s\n" "$(git -C elasticsearch rev-parse HEAD)"
else else
if [ -d "./elasticsearch" ]; then if [ -d "./elasticsearch" ]; then
echo "Using existing 'elasticsearch' checkout" echo "Using existing 'elasticsearch' checkout"