File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ docker run \
128
128
-u " $( id -u) " \
129
129
--env " RUBY_VERSION=${RUBY_VERSION} " \
130
130
--env " WORKFLOW=${WORKFLOW} " \
131
+ --env " CLIENTS_GITHUB_TOKEN=${CLIENTS_GITHUB_TOKEN} " \
131
132
--name test-runner \
132
133
--volume " ${repo} :/usr/src/app" \
133
134
--rm \
Original file line number Diff line number Diff line change @@ -38,12 +38,19 @@ namespace :automation do
38
38
39
39
desc 'Generate API code'
40
40
task :codegen do
41
- version = YAML . load_file ( File . expand_path ( "#{ __dir__ } /../.buildkite/pipeline.yml" ) ) [ 'steps' ] . first [ 'env' ] [ 'STACK_VERSION' ]
41
+ path = File . expand_path ( '../elasticsearch-api/' , __dir__ )
42
+ branch = YAML . load_file ( File . expand_path ( "#{ __dir__ } /../.buildkite/pipeline.yml" ) ) [ 'steps' ] . first [ 'env' ] [ 'ES_YAML_TESTS_BRANCH' ]
43
+ unless File . exist? ( File . expand_path ( 'elastic-client-generator-ruby' , __dir__ ) )
44
+ sh "git clone https://#{ ENV [ 'CLIENTS_GITHUB_TOKEN' ] } @github.com/elastic/elastic-client-generator-ruby.git "
45
+ end
42
46
43
- Rake ::Task [ 'es:download_artifacts' ] . invoke ( version )
44
- sh "cd #{ CURRENT_PATH . join ( 'elasticsearch-api/utils' ) } \
45
- && BUNDLE_GEMFILE=`pwd`/Gemfile \
46
- && bundle exec thor code:generate"
47
+ sh "export ES_RUBY_CLIENT_PATH=#{ path } " \
48
+ ' && cd elastic-client-generator-ruby/elasticsearch ' \
49
+ ' && sudo bundle install ' \
50
+ " && bundle exec rake update[#{ branch } ]" \
51
+ ' && bundle exec rake gen_es' \
52
+ ' && cd ../../ ' \
53
+ ' && rm -rf elastic-client-generator-ruby '
47
54
end
48
55
49
56
desc <<-DESC
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ namespace :es do
73
73
abort e . message
74
74
end
75
75
76
- desc 'Download artifacts (tests and REST spec) for currently running cluster'
76
+ # Deprecated
77
+ desc 'Download Elasticsearch artifacts (tests and REST spec) for currently running cluster'
77
78
task :download_artifacts , :version do |_ , args |
78
79
json_filename = CURRENT_PATH . join ( 'tmp/artifacts.json' )
79
80
You can’t perform that action at this time.
0 commit comments