diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72f8eeacbaf..65f6d927b37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,6 +108,9 @@ build-gem: script: - export RUBY_PACKAGE_VERSION=$(cat tmp/version.txt) - export DATADOG_GEM_LOCATION=$(readlink -f pkg/datadog-*.gem) + - ruby -v + - gem -v + - bundler -v - ruby .gitlab/install_datadog_deps.rb artifacts: paths: diff --git a/.gitlab/Dockerfile-2.7.8 b/.gitlab/Dockerfile-2.7.8 index 3d53736129f..447c2bfa2df 100644 --- a/.gitlab/Dockerfile-2.7.8 +++ b/.gitlab/Dockerfile-2.7.8 @@ -1,4 +1,5 @@ -# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead. +# This is copied from official Docker image +# but compile Ruby with `--disable-shared` and update gem version FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster @@ -75,6 +76,8 @@ RUN set -eux; \ # verify we have no "ruby" packages installed if dpkg -l | grep -i ruby; then exit 1; fi; \ [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ +# update gem version + gem update --system 3.3.27;\ # rough smoke test ruby --version; \ gem --version; \ diff --git a/.gitlab/Dockerfile-3.0.6 b/.gitlab/Dockerfile-3.0.6 index d33612bd083..08b2947d849 100644 --- a/.gitlab/Dockerfile-3.0.6 +++ b/.gitlab/Dockerfile-3.0.6 @@ -1,4 +1,5 @@ -# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead. +# This is copied from official Docker image +# but compile Ruby with `--disable-shared` and update gem version FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster @@ -75,6 +76,8 @@ RUN set -eux; \ # verify we have no "ruby" packages installed if dpkg -l | grep -i ruby; then exit 1; fi; \ [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ +# update gem version + gem update --system;\ # rough smoke test ruby --version; \ gem --version; \ diff --git a/.gitlab/Dockerfile-3.1.4 b/.gitlab/Dockerfile-3.1.4 index 867a1f4075e..c27d01a0081 100644 --- a/.gitlab/Dockerfile-3.1.4 +++ b/.gitlab/Dockerfile-3.1.4 @@ -1,4 +1,5 @@ -# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead. +# This is copied from official Docker image +# but compile Ruby with `--disable-shared` and update gem version FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster @@ -75,6 +76,8 @@ RUN set -eux; \ # verify we have no "ruby" packages installed if dpkg -l | grep -i ruby; then exit 1; fi; \ [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ +# update gem version + gem update --system;\ # rough smoke test ruby --version; \ gem --version; \ diff --git a/.gitlab/Dockerfile-3.2.2 b/.gitlab/Dockerfile-3.2.2 index 20348ab5e70..5f0b67f3a0a 100644 --- a/.gitlab/Dockerfile-3.2.2 +++ b/.gitlab/Dockerfile-3.2.2 @@ -1,4 +1,5 @@ -# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead. +# This is copied from official Docker image, but +# compile Ruby with `--disable-shared` and update gem version FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster @@ -99,6 +100,8 @@ RUN set -eux; \ # verify we have no "ruby" packages installed if dpkg -l | grep -i ruby; then exit 1; fi; \ [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ +# update gem version + gem update --system;\ # rough smoke test ruby --version; \ gem --version; \ diff --git a/.gitlab/install_datadog_deps.rb b/.gitlab/install_datadog_deps.rb index 091bc35bc8b..f2c7f506fea 100755 --- a/.gitlab/install_datadog_deps.rb +++ b/.gitlab/install_datadog_deps.rb @@ -4,8 +4,22 @@ require 'fileutils' require 'pathname' +puts '=== RUBY_VERSION ===' +puts RUBY_VERSION +puts '=== RUBY_ENGINE ===' +puts RUBY_ENGINE +puts '=== RUBY_ENGINE_VERSION ===' +puts RUBY_ENGINE_VERSION +puts '=== RUBY_PLATFORM ===' +puts RUBY_PLATFORM +puts '=== GEM PLATFORM ===' +puts Gem::Platform.local + ruby_api_version = Gem.ruby_api_version +puts '=== RUBY API VERISON ===' +puts ruby_api_version + current_path = Pathname.new(FileUtils.pwd) tmp_path = current_path.join('tmp') @@ -19,6 +33,7 @@ File.open(gemfile_file_path, 'w') do |file| file.write("source 'https://rubygems.org'\n") file.write("gem 'datadog', '#{ENV.fetch('RUBY_PACKAGE_VERSION')}', path: '#{current_path}'\n") + file.write("gem 'ffi', '1.16.3'\n") # Mimick outdated `msgpack` version, uncomment below line to test # file.write("gem 'msgpack', '1.6.0'\n") end diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..5e0380954a2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "Dockerfile*": "dockerfile" + } +} diff --git a/spec/datadog/release_gem_spec.rb b/spec/datadog/release_gem_spec.rb index 51619fd2e7c..5d7769841b7 100644 --- a/spec/datadog/release_gem_spec.rb +++ b/spec/datadog/release_gem_spec.rb @@ -46,6 +46,7 @@ |\.circleci |\.github |\.gitlab + |\.vscode |lib-injection |appraisal |benchmarks