diff --git a/lib/buildkite/test_collector/ci.rb b/lib/buildkite/test_collector/ci.rb index 85ce46a..efc321c 100644 --- a/lib/buildkite/test_collector/ci.rb +++ b/lib/buildkite/test_collector/ci.rb @@ -37,6 +37,7 @@ def analytics_env "message" => ENV["BUILDKITE_ANALYTICS_MESSAGE"], "execution_name_prefix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_PREFIX"], "execution_name_suffix" => ENV["BUILDKITE_ANALYTICS_EXECUTION_NAME_SUFFIX"], + "language_version" => RUBY_VERSION, "version" => Buildkite::TestCollector::VERSION, "collector" => "ruby-#{Buildkite::TestCollector::NAME}", }.select { |_, value| !value.nil? } diff --git a/spec/test_collector/ci_spec.rb b/spec/test_collector/ci_spec.rb index 0a4a091..7697422 100644 --- a/spec/test_collector/ci_spec.rb +++ b/spec/test_collector/ci_spec.rb @@ -11,6 +11,7 @@ let(:job_id) { "242424" } let(:message) { "bananas are tasty" } let(:version) { Buildkite::TestCollector::VERSION } + let(:language_version) { RUBY_VERSION } let(:name) { "ruby-#{Buildkite::TestCollector::NAME}" } let(:test_value) { "test_value" } @@ -64,6 +65,7 @@ "number" => bk_number, "job_id" => bk_job_id, "message" => bk_message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -97,6 +99,7 @@ "message" => message, "execution_name_prefix" => "execution_name_prefix", "execution_name_suffix" => "execution_name_suffix", + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -135,6 +138,7 @@ "branch" => gha_ref, "commit_sha" => gha_sha, "number" => gha_run_number, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -164,6 +168,7 @@ "number" => number, "job_id" => job_id, "message" => message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -198,6 +203,7 @@ "branch" => c_branch, "commit_sha" => c_sha, "number" => c_number, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -227,6 +233,7 @@ "number" => number, "job_id" => job_id, "message" => message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -262,6 +269,7 @@ "commit_sha" => c_sha, "number" => nil, "message" => c_message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -292,6 +300,7 @@ "number" => number, "job_id" => job_id, "message" => message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -313,6 +322,7 @@ expect(result).to match({ "CI" => "generic", "key" => key, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -342,6 +352,7 @@ "number" => number, "job_id" => job_id, "message" => message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -361,6 +372,7 @@ expect(result).to match({ "CI" => nil, "key" => "845ac829-2ab3-4bbb-9e24-3529755a6d37", + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, @@ -390,6 +402,7 @@ "number" => number, "job_id" => job_id, "message" => message, + "language_version" => language_version, "version" => version, "collector" => name, "test" => test_value, diff --git a/spec/test_collector/http_client_spec.rb b/spec/test_collector/http_client_spec.rb index cedf98a..3c42adc 100644 --- a/spec/test_collector/http_client_spec.rb +++ b/spec/test_collector/http_client_spec.rb @@ -25,6 +25,7 @@ "run_env": { "CI": nil, "key": "build-123", + "language_version" => RUBY_VERSION, "version": Buildkite::TestCollector::VERSION, "collector": "ruby-buildkite-test_collector", "test": "test_value"