[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@8c39aafc2d2af2459e9244ca89a130112196a206
@@ -96,6 +96,7 @@ if [ -z ${USE_EXISTING_ES:+x} ]; then
fi
echo "Checking out Elasticsearch '$BRANCH' branch..."
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
if [ -d "./elasticsearch" ]; then
echo "Using existing 'elasticsearch' checkout"
