# Running elasticsearch in Jenkins to test queries

**URL:** <https://discuss.elastic.co/t/running-elasticsearch-in-jenkins-to-test-queries/71280>\
**Category:** Elasticsearch\
**Created:** [January 11, 2017, 8:35pm UTC](https://discuss.elastic.co/t/running-elasticsearch-in-jenkins-to-test-queries/71280 "2017-01-11T20:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanAaron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathanaaron/32/24405_2.png) [@JonathanAaron](https://discuss.elastic.co/u/JonathanAaron)\
**Post date:** [January 11, 2017, 8:35pm UTC](https://discuss.elastic.co/t/running-elasticsearch-in-jenkins-to-test-queries/71280/1 "2017-01-11T20:35:57Z")

</div>

I'm planning on having an elasticsearch 5.1.1 folder in my git project. When Jenkins does a build it'll spin up a local elasticsearch instance, run some integration test that will query ES, shut down and continue with the deployment process. Anyone else doing this? Any tips?

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 11, 2017, 10:56pm UTC](https://discuss.elastic.co/t/running-elasticsearch-in-jenkins-to-test-queries/71280/2 "2017-01-11T22:56:25Z")

</div>

Yes, I do it in all my (plugin) projects. The integration tests are a gradle task. It's easy to run gradle tasks in jenkins.

All my production ETL jobs are also gradle tasks, embedded in a jenkins CI environment.

Instead of a "local Elasticsearch instance" you will be happier with a transport client. You can select to connect to a dev or production cluster by addressing another host/port and you don't have to care about cluster state network traffic or cluster node connection mess.

Not sure what you mean by "the deployment process", sounds like JEE.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 8, 2017, 10:56pm UTC](https://discuss.elastic.co/t/running-elasticsearch-in-jenkins-to-test-queries/71280/3 "2017-02-08T22:56:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
