File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ docker run \
128128 -u " $( id -u) " \
129129 --env " RUBY_VERSION=${RUBY_VERSION} " \
130130 --env " WORKFLOW=${WORKFLOW} " \
131+ --env " CLIENTS_GITHUB_TOKEN=${CLIENTS_GITHUB_TOKEN} " \
131132 --name test-runner \
132133 --volume " ${repo} :/usr/src/app" \
133134 --rm \
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ profile/**/data/*.json
1616parsed_alternative_report.json
1717.byebug_history
1818build /
19- * .gem
19+ * .gem
20+ elastic-client-generator-ruby
Original file line number Diff line number Diff line change @@ -38,12 +38,19 @@ namespace :automation do
3838
3939 desc 'Generate API code'
4040 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
4246
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 '
4754 end
4855
4956 desc <<-DESC
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ namespace :es do
7373 abort e . message
7474 end
7575
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'
7778 task :download_artifacts , :version do |_ , args |
7879 json_filename = CURRENT_PATH . join ( 'tmp/artifacts.json' )
7980
You can’t perform that action at this time.
0 commit comments