# Starting/Stoping Elasticsearch with Gradle?

**URL:** <https://discuss.elastic.co/t/starting-stoping-elasticsearch-with-gradle/71566>\
**Category:** Elasticsearch\
**Created:** [January 13, 2017, 8:42pm UTC](https://discuss.elastic.co/t/starting-stoping-elasticsearch-with-gradle/71566 "2017-01-13T20:42:03Z")\
**Posts on this page:** 2\
**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 13, 2017, 8:42pm UTC](https://discuss.elastic.co/t/starting-stoping-elasticsearch-with-gradle/71566/1 "2017-01-13T20:42:03Z")

</div>

So I've added Elasticsearch 5.1.1 to my project. So my plan is to have Jenkins pull the repo down. Then it'll run a test task which should start elasticsearch, run integration tests(es queries), then stop. I feel starting elasticsearch should be easy to do within the gradle task, but I'm not so sure about stopping elasticsearch after the tests are done. What's the best way to handle that?

Thanks,

Jonathan

---

<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 10, 2017, 8:42pm UTC](https://discuss.elastic.co/t/starting-stoping-elasticsearch-with-gradle/71566/2 "2017-02-10T20:42:19Z")

</div>

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