Skip to content

Commit 2907f3a

Browse files
committed
Adds es:up Docker task to run Elasticsearch from current STACK_VERSION
1 parent 93466fe commit 2907f3a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ rake docker:start[VERSION]
3434
E.g.: `rake docker:start[8.0-SNAPSHOT]`.
3535
To start the container with Platinum, pass it in as a parameter: `rake docker:start[7.x-SNAPSHOT,platinum]`.
3636

37+
There's another rake task that will read the STACK_VERSION value from `.buildkite/pipeline.yml` and run that version of Elasticsearch: `rake es:up`.
38+
3739
If you get this error when running the script:
3840
```
3941
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

rake_tasks/docker_tasks.rake

+15
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,18 @@ namespace :docker do
3838
system("STACK_VERSION=#{params[:version]} TEST_SUITE=#{test_suite} ./.ci/run-elasticsearch.sh")
3939
end
4040
end
41+
42+
namespace :es do
43+
desc <<~DOC
44+
Start Elasticsearch docker container (shortcut), reads STACK_VERSION from buildkite pipeline
45+
DOC
46+
task :up do
47+
version = File.read('./.buildkite/pipeline.yml').
48+
split("\n").
49+
select { |a| a.include? 'STACK_VERSION' }
50+
.first
51+
.strip
52+
.gsub('STACK_VERSION: ','')
53+
Rake.application.invoke_task("docker:start[#{version}]")
54+
end
55+
end

0 commit comments

Comments
 (0)