Elasticsearch Integ Tests
To run integ tests against ElasticSearch use Elastic's official docker image as a base and extend it by sudo
FROM elasticsearch:8.2.2USER rootRUN apt update && apt install -y sudo
Suppose you published the image to oozie/elastic
. From there, simply run your integ tests in the task container. ElasticSearch will take about 30 seconds to boot up.
A minimal self-contained pipeline:
jobs:- name: run-elasticplan:- task: integtestconfig:platform: linuximage_resource:type: docker-imagesource:repository: oozie/elasticrun:path: /bin/bashargs:- -c- |(sudo -u elasticsearch /usr/share/elasticsearch/bin/elasticsearch -Expack.security.enabled=false -E discovery.type=single-node > elastic.log) &while ! curl http://localhost:9200; do sleep 10; done