diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 08991cb9340..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,609 +0,0 @@ -version: 2.1 - -test_containers: - - &container_base - image: <> - environment: - BUNDLE_GEMFILE: /app/Gemfile - JRUBY_OPTS: --dev # Faster JVM startup: https://github.com/jruby/jruby/wiki/Improving-startup-time#use-the---dev-flag - # Override number of concurrent compiles in grpc gem, see https://github.com/grpc/grpc/pull/28250 and https://github.com/DataDog/dd-trace-rb/issues/1791 - # If you see gem installation failing with "Killed" on CircleCI and `gem install --platform ruby grpc` reproduces the - # issue when you connect to the testing container via ssh, then try lowering this file a notch. - GRPC_RUBY_BUILD_PROCS: 6 - DD_INSTRUMENTATION_TELEMETRY_ENABLED: false - DD_REMOTE_CONFIGURATION_ENABLED: false - TEST_OPENSEARCH_HOST: opensearch - TEST_OPENSEARCH_PORT: 9200 - DD_AGENT_HOST: testagent - DD_TRACE_AGENT_PORT: 9126 - DATADOG_GEM_CI: true - TEST_DATADOG_INTEGRATION: 1 - COVERAGE_BASE_DIR: coverage - - &test_job_default - # TODO: We should move away from using a directory - # TODO: that requires root permission to be created. - # TODO: Changing this requires rebuilding all docker images. - working_directory: /app - shell: /bin/bash --login - resource_class: <> - parameters: - ruby_version: - description: Ruby version - type: string - image: - description: Docker image location - type: string - resource_class_to_use: - description: Resource class to use - type: string - default: medium - edge: - description: Use latest version of dependencies during testing - type: boolean - default: false - docker: - - *container_base - -check_exact_bundle_cache_hit: &check_exact_bundle_cache_hit - run: - name: Check if we restored an exact cache of gems that this job requires - # CircleCI doesn't tell us if we had a perfect cache match or partial match. - # To accomplish such check, we save `bundle_checksum` alongside the cached - # gems. After gems are restored, we compare the restored `bundle_checksum`'s - # content with the current commit's `bundle_checksum`. - # - # Because we are using a "soft" approach to our gemset lock files, we allow - # for partial matches to lock files until a new release goes out. - # This means that we might install slightly out of date gems, instead of the - # very latest versions from RubyGems until the next gemset update commit. - command: | - ! cmp -s .circleci/bundle_checksum /usr/local/bundle/bundle_checksum - echo "export CI_BUNDLE_CACHE_HIT=$?" >> $BASH_ENV -save_bundle_checksum: &save_bundle_checksum - run: - name: Save current bundle checksum alongside cached gems - command: | - if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then - # Recompute gemfiles/*.lock checksum, as those files might have changed - cat Gemfile Gemfile.lock Appraisals gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum - fi - cp .circleci/bundle_checksum /usr/local/bundle/bundle_checksum -step_bundle_install: &step_bundle_install - run: - name: Install gem dependencies - command: | - if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then - bundle install - else - echo "All required gems were found in cache." - fi -step_appraisal_install: &step_appraisal_install - run: - name: Install Appraisal gems - command: | - if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then - bundle exec rake dependency:generate - bundle exec rake dependency:install - else - bundle exec rake dependency:generate # Generate the appraisal files to match the lockfiles in the tree - echo "All required gems were found in cache." - fi -step_compute_bundle_checksum: &step_compute_bundle_checksum - run: - name: Compute bundle checksum - # This checksum leaves some leeway for changes to Gemfile.lock, as - # we have a "soft" approach to committing gemset changes until release, given - # updating the gemset lock files produces extremely large commits. - command: | - bundle lock # Create Gemfile.lock - cat Gemfile Gemfile.lock Appraisals gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum -step_run_all_tests: &step_run_all_tests - run: - name: Run tests - command: | - # Ensures it's possible to debug hung tests in CI - echo "--format=documentation" >> .rspec-local - - # Configure RSpec metadata exporter - echo " - --format=RspecJunitFormatter - --out='/tmp/rspec/-<%= ARGV.join.gsub('/', '-') %>.xml' - " >> .rspec-local - - bundle exec rake ci -step_get_test_agent_trace_check_results: &step_get_test_agent_trace_check_results - run: - name: Get APM Test Agent Trace Check Results - command: | - set +e # Disable exiting from testagent response failure - SUMMARY_RESPONSE=$(curl -s -w "\n%{http_code}" -o summary_response.txt http://testagent:9126/test/trace_check/summary) - set -e - SUMMARY_RESPONSE_CODE=$(echo "$SUMMARY_RESPONSE" | awk 'END {print $NF}') - - if [[ SUMMARY_RESPONSE_CODE -eq 200 ]]; then - echo "APM Test Agent is running. (HTTP 200)" - else - echo "APM Test Agent is not running and was not used for testing. No checks failed." - exit 0 - fi - - RESPONSE=$(curl -s -w "\n%{http_code}" -o response.txt http://testagent:9126/test/trace_check/failures) - RESPONSE_CODE=$(echo "$RESPONSE" | awk 'END {print $NF}') - - if [[ $RESPONSE_CODE -eq 200 ]]; then - echo "All APM Test Agent Check Traces returned successful! (HTTP 200)" - echo "APM Test Agent Check Traces Summary Results:" - cat summary_response.txt | jq '.' - elif [[ $RESPONSE_CODE -eq 404 ]]; then - echo "Real APM Agent running in place of TestAgent, no checks to validate!" - else - echo "APM Test Agent Check Traces failed with response code: $RESPONSE_CODE" - echo "Failures:" - cat response.txt - echo "APM Test Agent Check Traces Summary Results:" - cat summary_response.txt | jq '.' - exit 1 - fi - when: always - -filters_all_branches_and_tags: &filters_all_branches_and_tags - filters: - tags: - only: /.*/ - -orbs: - orb: - orbs: - codecov: codecov/codecov@3.2.3 - jobs: - build: - <<: *test_job_default - steps: - - checkout - - run: - name: Know the environment - command: | - ruby -v - gem -v - bundle -v - - restore_cache: - keys: - - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - - *step_compute_bundle_checksum - - restore_cache: - keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}- - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }} - - *check_exact_bundle_cache_hit - - *step_bundle_install - - *step_appraisal_install # Run on a stable set of gems we integrate with - - *save_bundle_checksum - - save_cache: - key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - paths: - - /app - - save_cache: - key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - paths: - - /usr/local/bundle - build_and_test_integration: - executor: docker-integration - parameters: - ruby_version: - description: Ruby version - type: string - integration_apps: - description: Integration apps - type: string - steps: - - checkout - - setup_remote_docker: - docker_layer_caching: true - - run: - name: Build integration base images - command: ./integration/script/build-images -v <> - - run: - name: Build integration app images - command: | - for i in <>; do - ./integration/apps/$i/script/build-images -v <> - done - - run: - name: Test integration apps - command: | - for i in <>; do - ./integration/apps/$i/script/ci -v <> - done - test: - <<: *test_job_default - docker: - - <<: *container_base - - image: postgres:9.6 - environment: - - POSTGRES_PASSWORD=postgres - - POSTGRES_USER=postgres - - POSTGRES_DB=postgres - - image: starburstdata/presto:332-e.9 # Move to trinodb/trino after https://github.com/treasure-data/presto-client-ruby/issues/64 is resolved. - - image: mysql:8.0 - # As of MySQL 8.0, caching_sha2_password is now the default authentication plugin - # rather than mysql_native_password which was the default in previous versions. - command: --default-authentication-plugin=mysql_native_password - environment: - - MYSQL_ROOT_PASSWORD=root - - MYSQL_PASSWORD=mysql - - MYSQL_USER=mysql - - image: opensearchproject/opensearch:2.8.0 - name: opensearch - environment: - - discovery.type=single-node - - DISABLE_SECURITY_PLUGIN=true - - DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true - # Make sure it works on nearly full disk. - - cluster.routing.allocation.disk.threshold_enabled=true - - cluster.routing.allocation.disk.watermark.low=3gb - - cluster.routing.allocation.disk.watermark.high=2gb - - cluster.routing.allocation.disk.watermark.flood_stage=1gb - - cluster.routing.allocation.disk.threshold_enabled=false - - image: elasticsearch:8.1.3 - environment: - # Ensure production cluster requirements are not enforced - - discovery.type=single-node - - xpack.security.enabled=false - - ES_JAVA_OPTS=-Xms750m -Xmx750m - - image: redis:6.2 - - image: mongo:3.5 - - image: memcached:1.5-alpine - - image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 - name: testagent - environment: - - LOG_LEVEL=DEBUG - - TRACE_LANGUAGE=ruby - - PORT=9126 - - DD_POOL_TRACE_CHECK_FAILURES=true - - DD_DISABLE_ERROR_RESPONSES=true - - ENABLED_CHECKS=trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service - parallelism: 22 - steps: - - restore_cache: - keys: - - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - - restore_cache: - keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - - run: - name: Set coverage report directory - command: | - # Create a unique coverage directory for this job, to avoid conflicts when merging all results - echo 'export COVERAGE_DIR="$COVERAGE_BASE_DIR/versions/$CIRCLE_JOB/$CIRCLE_NODE_INDEX"' >> $BASH_ENV - # Install dockerize - - run: - name: Install dockerize - command: | - DOCKERIZE_URL="https://github.com/powerman/dockerize/releases/download/v0.17.0/dockerize-$(uname -s | tr '[:upper:]' '[:lower:]')-$(arch | sed 's/aarch64/arm64/')" - DOCKERIZE_URL: $DOCKERIZE_URL - curl --silent --show-error --location --fail --retry 3 --output /usr/local/bin/dockerize $DOCKERIZE_URL - chmod +x /usr/local/bin/dockerize - dockerize --version - # Test agent uses `jq` to check results - - run: - name: Install jq - command: apt update && apt install jq -y - # Wait for containers to start - - docker-wait: - port: 5432 - - docker-wait: - port: 8080 - - docker-wait: - port: 3306 - - docker-wait: - host: opensearch - port: 9200 - - docker-wait: - port: 9200 - - docker-wait: - port: 6379 - - docker-wait: - port: 27017 - - docker-wait: - port: 11211 - - docker-wait: - host: "testagent" - port: 9126 - - *step_run_all_tests - - *step_get_test_agent_trace_check_results - - store_test_results: - path: /tmp/rspec - - persist_to_workspace: - root: . - paths: - - coverage - coverage: - <<: *test_job_default - steps: - - restore_cache: - keys: - - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - - restore_cache: - keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - - attach_workspace: - at: /tmp/workspace - - run: - name: Generate combined coverage report for all tests - command: COVERAGE_DIR=/tmp/workspace/coverage bundle exec rake coverage:report - - codecov/upload: - file: /tmp/workspace/coverage/report/coverage.xml - - run: - name: Generate individual coverage report for each Ruby version - command: COVERAGE_DIR=/tmp/workspace/coverage bundle exec rake coverage:report_per_ruby_version - - store_artifacts: - path: /tmp/workspace/coverage/report/ - destination: coverage - changelog: - <<: *test_job_default - steps: - - restore_cache: - keys: - - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - - restore_cache: - keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/datadog/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - - attach_workspace: - at: /tmp/workspace - - run: - name: Format changelog - command: bundle exec rake changelog:format - - run: - name: Check if changelog was unformatted - command: | - if ! git diff-files --quiet; then - echo "Please run 'bundle exec rake changelog:format' and commit the results." - fi - commands: - docker-wait: - description: Wait for containers to listen on a TCP port. - parameters: - host: - description: Host name or IP address the container is running on. - type: string - default: localhost - port: - description: TCP port the container is listening on. - type: integer - timeout: - description: How long to wait for the port to be responsive. - type: string - default: 1m - steps: - - run: - name: Wait for container at <>:<> - command: dockerize -wait 'tcp://<>:<>' -timeout '<>' - executors: - docker-integration: - docker: - - image: circleci/buildpack-deps:stretch - -job_configuration: - # MRI - - &config-2_5 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-2.5.9' - image: ghcr.io/datadog/images-rb/engines/ruby:2.5 - resource_class_to_use: medium+ - - &config-2_6 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-2.6.10' - image: ghcr.io/datadog/images-rb/engines/ruby:2.6 - resource_class_to_use: medium+ - - &config-2_7 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-2.7.6' - image: ghcr.io/datadog/images-rb/engines/ruby:2.7 - resource_class_to_use: medium+ - - &config-2_7-small - <<: *config-2_7 - resource_class_to_use: small - - &config-3_0 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-3.0.4' - image: ghcr.io/datadog/images-rb/engines/ruby:3.0 - resource_class_to_use: medium+ - - &config-3_1 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-3.1.2' - image: ghcr.io/datadog/images-rb/engines/ruby:3.1 - resource_class_to_use: medium+ - - &config-3_2 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-3.2.0' - image: ghcr.io/datadog/images-rb/engines/ruby:3.2 - resource_class_to_use: medium+ - - &config-3_3 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-3.3.0' - image: ghcr.io/datadog/images-rb/engines/ruby:3.3 - resource_class_to_use: medium+ - - &config-3_4 - <<: *filters_all_branches_and_tags - ruby_version: 'ruby-3.4.0' - image: ghcr.io/datadog/images-rb/engines/ruby:3.4 - resource_class_to_use: medium+ - # ADD NEW RUBIES HERE - - &config-jruby-9_2 # More recent release of 9.2 - <<: *filters_all_branches_and_tags - ruby_version: 'jruby-9.2.21.0' - image: ghcr.io/datadog/images-rb/engines/jruby:9.2 - resource_class_to_use: large - - &config-jruby-9_3 - <<: *filters_all_branches_and_tags - ruby_version: 'jruby-9.3.9.0' - image: ghcr.io/datadog/images-rb/engines/jruby:9.3 - resource_class_to_use: large - - &config-jruby-9_4 - <<: *filters_all_branches_and_tags - ruby_version: 'jruby-9.4.7.0' - image: ghcr.io/datadog/images-rb/engines/jruby:9.4 - resource_class_to_use: large - -workflows: - version: 2 - build-and-test: - jobs: - - orb/coverage: - <<: *config-2_7-small - name: coverage - requires: - - test-2.5 - - test-2.6 - - test-2.7 - - test-3.0 - - test-3.1 - - test-3.2 - - test-3.3 - - test-3.4 - # ADD NEW RUBIES HERE - - test-jruby-9.2 - - test-jruby-9.3 - - test-jruby-9.4 - - orb/changelog: - <<: *config-2_7-small - name: changelog - requires: - - build-2.7 - filters: - branches: - only: /bump_to_version_.*/ - # Integration - - orb/build_and_test_integration: - name: build_and_test_integration-2.5 - integration_apps: 'rack rails-five rails-six' - ruby_version: '2.5' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-2.6 - integration_apps: 'rack rails-five rails-six sinatra2-classic sinatra2-modular hanami' - ruby_version: '2.6' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-2.7 - integration_apps: 'rack rails-five rails-six rails-seven sinatra2-classic sinatra2-modular hanami' - ruby_version: '2.7' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-3.0 - integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular' - ruby_version: '3.0' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-3.1 - integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular' - ruby_version: '3.1' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-3.2 - integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular' - ruby_version: '3.2' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-3.3 - integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular' - ruby_version: '3.3' - <<: *filters_all_branches_and_tags - - orb/build_and_test_integration: - name: build_and_test_integration-3.4 - integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular' - ruby_version: '3.4' - <<: *filters_all_branches_and_tags - # ⬆️ **Note**: If add/remove test apps above, remember to also copy-paste the changes to the "edge" workflow further down the file. - # - # ADD NEW RUBIES HERE - - orb/build: - <<: *config-2_5 - name: build-2.5 - - orb/test: - <<: *config-2_5 - name: test-2.5 - requires: - - build-2.5 - - orb/build: - <<: *config-2_6 - name: build-2.6 - - orb/test: - <<: *config-2_6 - name: test-2.6 - requires: - - build-2.6 - - orb/build: - <<: *config-2_7 - name: build-2.7 - - orb/test: - <<: *config-2_7 - name: test-2.7 - requires: - - build-2.7 - - orb/build: - <<: *config-3_0 - name: build-3.0 - - orb/test: - <<: *config-3_0 - name: test-3.0 - requires: - - build-3.0 - - orb/build: - <<: *config-3_1 - name: build-3.1 - - orb/test: - <<: *config-3_1 - name: test-3.1 - requires: - - build-3.1 - - orb/build: - <<: *config-3_2 - name: build-3.2 - - orb/test: - <<: *config-3_2 - name: test-3.2 - requires: - - build-3.2 - - orb/build: - <<: *config-3_3 - name: build-3.3 - - orb/test: - <<: *config-3_3 - name: test-3.3 - requires: - - build-3.3 - - orb/build: - <<: *config-3_4 - name: build-3.4 - - orb/test: - <<: *config-3_4 - name: test-3.4 - requires: - - build-3.4 - # ADD NEW RUBIES HERE - - orb/build: - <<: *config-jruby-9_2 - name: build-jruby-9.2 - - orb/test: - <<: *config-jruby-9_2 - name: test-jruby-9.2 - requires: - - build-jruby-9.2 - - orb/build: - <<: *config-jruby-9_3 - name: build-jruby-9.3 - - orb/test: - <<: *config-jruby-9_3 - name: test-jruby-9.3 - requires: - - build-jruby-9.3 - - orb/build: - <<: *config-jruby-9_4 - name: build-jruby-9.4 - - orb/test: - <<: *config-jruby-9_4 - name: test-jruby-9.4 - requires: - - build-jruby-9.4 diff --git a/.circleci/images/primary/README.md b/.circleci/images/primary/README.md deleted file mode 100644 index e781d8a4efe..00000000000 --- a/.circleci/images/primary/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Dockerfiles used for testing and development - -Container images for Ruby are from: https://github.com/DataDog/images-rb diff --git a/.circleci/images/primary/binary_version b/.circleci/images/primary/binary_version deleted file mode 100644 index 3bb8a497c5e..00000000000 --- a/.circleci/images/primary/binary_version +++ /dev/null @@ -1 +0,0 @@ -464 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 4d2d111bf81..00000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,164 +0,0 @@ -stages: - - manual-images - - package - - shared-pipeline - - vaccine - - macrobenchmarks - - microbenchmarks - - benchmarks - -include: - - remote: https://gitlab-templates.ddbuild.io/libdatadog/include/one-pipeline.yml - - local: ".gitlab/benchmarks.yml" - -variables: - RUBY_CUSTOM_IMAGE_BASE: $DOCKER_REGISTRY/ci/dd-trace-rb/custom_ruby - REPO_LANG: ruby # ruby is used rather that "rb" - BUILD_JOB_NAME: save_versions - -default: - tags: ["runner:main", "size:large"] - -.build-image-base: - stage: manual-images - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" - changes: - - .gitlab/Dockerfile-* - when: manual - allow_failure: true - image: $DOCKER_REGISTRY/docker:20.10.13 - parallel: - matrix: - # ADD NEW RUBIES HERE - - RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] - script: - - > - docker build - --tag $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID - --file .gitlab/Dockerfile-$RUBY_VERSION - . - - docker push --all-tags $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE - -build-image-amd64: - extends: .build-image-base - tags: ["runner:docker"] - variables: - ARCHITECTURE: amd64 - -build-image-arm64: - extends: .build-image-base - tags: ["runner:docker-arm", "platform:arm64"] - variables: - ARCHITECTURE: arm64 - -promote-image: - stage: manual-images - when: manual - tags: ["runner:docker"] - image: $DOCKER_REGISTRY/docker:20.10.13 - parallel: - matrix: - # ADD NEW RUBIES HERE - - RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] - ARCHITECTURE: ["amd64", "arm64"] - script: - - docker pull $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID - - docker tag $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:current - - docker push $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:current - -build-gem: - image: $DOCKER_REGISTRY/images/mirror/ruby:3.2.2 - stage: package - script: - - | - if [ -z "$CI_COMMIT_TAG" ]; then - echo CI_JOB_ID=$CI_JOB_ID - echo CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME - echo CI_COMMIT_SHA=$CI_COMMIT_SHA - - .gitlab/patch_gem_version.sh glci $CI_JOB_ID $CI_COMMIT_REF_NAME $CI_COMMIT_SHA - fi - - bundle install && chmod go-w -R . && bundle exec rake build - - mkdir -p tmp && ruby -Ilib -rdatadog/version -e 'puts Gem::Version.new(Datadog::VERSION::STRING).to_s' >> tmp/version - artifacts: - paths: - - pkg - - tmp - - lib/datadog/version.rb - -install-dependencies: - image: $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCH:current - tags: [ "arch:$ARCH" ] - parallel: - matrix: - # Promote again when adding 3.4 support - - RUBY_VERSION: ["3.3", "3.2", "3.1", "3.0", "2.7"] - ARCH: [ "amd64", "arm64" ] - stage: package - needs: - - build-gem - script: - - export RUBY_PACKAGE_VERSION=$(cat tmp/version) - - export DATADOG_GEM_LOCATION=$(readlink -f pkg/datadog-*.gem) - - ruby -v - - gem -v - - bundler -v - - ruby .gitlab/install_datadog_deps.rb - artifacts: - paths: - - pkg - - tmp/$ARCH - - lib/datadog/version.rb - -package-oci: - needs: - - build-gem - - install-dependencies - -requirements_json_test: - rules: - - when: on_success - variables: - REQUIREMENTS_BLOCK_JSON_PATH: "lib-injection/test_block.json" - REQUIREMENTS_ALLOW_JSON_PATH: "lib-injection/test_allow.json" - -onboarding_tests_installer: - parallel: - matrix: - - ONBOARDING_FILTER_WEBLOG: [test-app-ruby, test-app-ruby-container] - -onboarding_tests_k8s_injection: - parallel: - matrix: - - WEBLOG_VARIANT: [dd-lib-ruby-init-test-rails, dd-lib-ruby-init-test-rails-explicit,dd-lib-ruby-init-test-rails-gemsrb] - -save_versions: - image: $DOCKER_REGISTRY/images/mirror/ruby:3.2.2 - stage: package - needs: [] - script: - - git fetch --all - - echo COMMIT_SHA_1X=$(git rev-parse origin/1.x-stable) >> upstream.env - - echo COMMIT_SHA_2X=$(git rev-parse origin/master) >> upstream.env - artifacts: - paths: - - upstream.env - -deploy_to_reliability_env: - needs: - - save_versions - -vaccine: - image: $DOCKER_REGISTRY/docker:20.10.13 - tags: [ "arch:amd64" ] - stage: vaccine - needs: [create-multiarch-lib-injection-image] - script: | - GH_VACCINE_PAT=$(vault kv get -field=vaccine-token kv/k8s/gitlab-runner/dd-trace-rb/github-token) - - curl -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token $GH_VACCINE_PAT" \ - https://api.github.com/repos/TonyCTHsu/vaccine/actions/workflows/vaccine.yml/dispatches \ - -d '{"ref":"master", "inputs": {"commit_sha": "'$CI_COMMIT_SHA'"}}' diff --git a/.gitlab/Dockerfile-2.7 b/.gitlab/Dockerfile-2.7 deleted file mode 100644 index 099626411cd..00000000000 --- a/.gitlab/Dockerfile-2.7 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:2.7-centos-gcc diff --git a/.gitlab/Dockerfile-3.0 b/.gitlab/Dockerfile-3.0 deleted file mode 100644 index e342afc299a..00000000000 --- a/.gitlab/Dockerfile-3.0 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:3.0-centos-gcc diff --git a/.gitlab/Dockerfile-3.1 b/.gitlab/Dockerfile-3.1 deleted file mode 100644 index b28521c11b9..00000000000 --- a/.gitlab/Dockerfile-3.1 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:3.1-centos-gcc diff --git a/.gitlab/Dockerfile-3.2 b/.gitlab/Dockerfile-3.2 deleted file mode 100644 index 9c18c8072ff..00000000000 --- a/.gitlab/Dockerfile-3.2 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:3.2-centos-gcc diff --git a/.gitlab/Dockerfile-3.3 b/.gitlab/Dockerfile-3.3 deleted file mode 100644 index d854cb28efd..00000000000 --- a/.gitlab/Dockerfile-3.3 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:3.3-centos-gcc diff --git a/.gitlab/Dockerfile-3.4 b/.gitlab/Dockerfile-3.4 deleted file mode 100644 index 8159a223623..00000000000 --- a/.gitlab/Dockerfile-3.4 +++ /dev/null @@ -1 +0,0 @@ -FROM ghcr.io/datadog/images-rb/engines/ruby:3.4-centos-gcc diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml deleted file mode 100644 index ec9a291a5c0..00000000000 --- a/.gitlab/benchmarks.yml +++ /dev/null @@ -1,194 +0,0 @@ -# ----------------------------------------------------- -# Benchmarking Platform configuration -# ----------------------------------------------------- - -variables: - GITLAB_BENCHMARKS_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:ruby-gitlab - GITLAB_DDPROF_BENCHMARK_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:ruby-ddprof-benchmark - BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-rb - -.benchmarks: - stage: macrobenchmarks - tags: ["runner:apm-k8s-same-cpu"] - needs: [] - timeout: 1h - rules: - - if: $CI_COMMIT_REF_NAME == "master" - when: always - - when: manual - # If you have a problem with Gitlab cache, see Troubleshooting section in Benchmarking Platform docs - image: $GITLAB_BENCHMARKS_CI_IMAGE - script: - - git clone --branch ruby/gitlab https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform - - bp-runner bp-runner.yml --debug - artifacts: - name: "artifacts" - when: always - paths: - - platform/artifacts/ - expire_in: 3 months - variables: - # Benchmark's env variables. Modify to tweak benchmark parameters. - DD_TRACE_DEBUG: "false" - DD_RUNTIME_METRICS_ENABLED: "true" - - DD_SERVICE: "bp-ruby-gitlab" - DD_ENV: "staging" - - # Gitlab makes use of the rugged gem, which triggers the automatic no signals workaround use, see - # https://docs.datadoghq.com/profiler/profiler_troubleshooting/ruby/#unexpected-failures-or-errors-from-ruby-gems-that-use-native-extensions-in-dd-trace-rb-1110 - # But in practice the endpoints we test it aren't affected, so we prefer to run the profiler in its default, - # better accuracy, mode. - DD_PROFILING_NO_SIGNALS_WORKAROUND_ENABLED: "false" - - # Default `false` for all features, overwrite by each variants. - DD_TRACE_ENABLED: "false" - DD_PROFILING_ENABLED: "false" - DD_APPSEC_ENABLED: "false" - - ADD_TO_GEMFILE: "gem 'datadog', require: 'datadog/auto_instrument', github: 'DataDog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - - K6_OPTIONS_NORMAL_OPERATION_RATE: 30 - K6_OPTIONS_NORMAL_OPERATION_DURATION: 10m - K6_OPTIONS_NORMAL_OPERATION_GRACEFUL_STOP: 1m - K6_OPTIONS_NORMAL_OPERATION_PRE_ALLOCATED_VUS: 4 - K6_OPTIONS_NORMAL_OPERATION_MAX_VUS: 4 - - K6_OPTIONS_HIGH_LOAD_RATE: 200 - K6_OPTIONS_HIGH_LOAD_DURATION: 5m - K6_OPTIONS_HIGH_LOAD_GRACEFUL_STOP: 30s - K6_OPTIONS_HIGH_LOAD_PRE_ALLOCATED_VUS: 4 - K6_OPTIONS_HIGH_LOAD_MAX_VUS: 4 - - # Gitlab and BP specific env vars. Do not modify. - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-rb - FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true" - - # Workaround: Currently we're not running the benchmarks on every PR, but GitHub still shows them as pending. - # By marking the benchmarks as allow_failure, this should go away. (This workaround should be removed once the - # benchmarks get changed to run on every PR) - allow_failure: true - -baseline: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: baseline - -only-tracing: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-tracing - DD_TRACE_ENABLED: "true" - -only-profiling: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-profiling - DD_PROFILING_ENABLED: "true" - ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - -only-profiling-alloc: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-profiling - DD_PROFILING_ENABLED: "true" - DD_PROFILING_ALLOCATION_ENABLED: "true" - ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - -only-profiling-heap: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-profiling - DD_PROFILING_ENABLED: "true" - DD_PROFILING_ALLOCATION_ENABLED: "true" - DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED: "true" - ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - -only-profiling-gvl: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: only-profiling - DD_PROFILING_ENABLED: "true" - DD_PROFILING_PREVIEW_GVL_ENABLED: "true" - ADD_TO_GEMFILE: "gem 'datadog', github: 'datadog/dd-trace-rb', ref: '$CI_COMMIT_SHA'" - -profiling-and-tracing: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: profiling-and-tracing - DD_TRACE_ENABLED: "true" - DD_PROFILING_ENABLED: "true" - -tracing-and-appsec: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: tracing-and-appsec - DD_TRACE_ENABLED: "true" - DD_APPSEC_ENABLED: "true" - -profiling-and-tracing-and-appsec: - extends: .benchmarks - variables: - DD_BENCHMARKS_CONFIGURATION: profiling-and-tracing-and-appsec - DD_TRACE_ENABLED: "true" - DD_PROFILING_ENABLED: "true" - DD_APPSEC_ENABLED: "true" - -# ----------------------------------------------------- -# Microbenchmarks that report to statsd -# ----------------------------------------------------- -ddprof-benchmark: - stage: microbenchmarks - tags: ["runner:apm-k8s-same-cpu"] - timeout: 1h - when: manual - image: $GITLAB_DDPROF_BENCHMARK_CI_IMAGE - script: - - export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :) - - export DD_API_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-rb.dd_api_key --with-decryption --query "Parameter.Value" --out text) - - git clone --branch ruby/ddprof-benchmark https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform /platform && cd /platform - - ./steps/capture-hardware-software-info.sh - - ./steps/run-benchmarks.sh - - "./steps/upload-results-to-s3.sh || :" - artifacts: - name: "reports" - paths: - - reports/ - expire_in: 3 months - variables: - FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true" # Important tweak for stability of benchmarks - LATEST_COMMIT_ID: $CI_COMMIT_SHA - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-rb -benchmarks: - stage: benchmarks - when: always - tags: ["runner:apm-k8s-tweaked-metal"] - image: $BASE_CI_IMAGE - interruptible: true - timeout: 1h - script: - - export ARTIFACTS_DIR="$(pwd)/artifacts" && (mkdir "${ARTIFACTS_DIR}" || :) - - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" - - git clone --branch dd-trace-rb https://github.com/DataDog/benchmarking-platform benchmarking-platform && cd benchmarking-platform - - gem -v - - bundle -v - - gem list bundler - - ./steps/capture-hardware-software-info.sh - - ./steps/run-benchmarks.sh - - ./steps/analyze-results.sh - - "./steps/upload-results-to-s3.sh || :" - - "./steps/upload-results-to-benchmarking-api.sh || :" - - "./steps/post-pr-comment.sh || :" - artifacts: - name: "artifacts" - when: always - paths: - - artifacts/ - expire_in: 3 months - variables: - KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-rb - FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true" - UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME - UPSTREAM_PROJECT_ID: $CI_PROJECT_ID - UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME - UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA diff --git a/.gitlab/check_gem_presence.rb b/.gitlab/check_gem_presence.rb deleted file mode 100755 index 9e62d124397..00000000000 --- a/.gitlab/check_gem_presence.rb +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env ruby - -require 'bundler/inline' - -gemfile { gem 'gems', source: 'https://rubygems.org' } - -require 'rubygems' -require 'gems' - -version = ARGV[0].chomp -version = version.delete_prefix('v') if version.start_with?('v') - -candidate = Gem::Version.new(version) - -retry_count = 0 -max_retries = 60 -interval = 60 - -loop do - versions = Gems.versions('datadog').map { |h| Gem::Version.new(h['number']) } - - if versions.include?(candidate) - puts "Gem version #{candidate} found!" - exit 0 - else - retry_count += 1 - puts "Attempt(#{retry_count}): Gem 'datadog' version '#{candidate}' not found." - - if retry_count >= max_retries - puts "Max retries(#{max_retries}) reached, stopping..." - exit 1 - else - puts "Retrying in #{interval} seconds..." - sleep interval - end - end -end diff --git a/.gitlab/check_gem_presence.sh b/.gitlab/check_gem_presence.sh deleted file mode 100755 index 2e68fe4829f..00000000000 --- a/.gitlab/check_gem_presence.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e - -if [ -n "$CI_COMMIT_TAG" ] && [ -z "$RUBY_PACKAGE_VERSION" ]; then - RUBY_PACKAGE_VERSION=${CI_COMMIT_TAG##v} -fi - -max_attempts=60 -interval=60 # Retry after 60 seconds -attempt=1 - -while [ $attempt -le $max_attempts ]; do - output=$(gem search datadog -e -v $RUBY_PACKAGE_VERSION | { grep $RUBY_PACKAGE_VERSION || :; }) - if [ -z "$output" ] - then - echo "Attempt ${attempt}/${max_attempts}: Not found yet." - attempt=$((attempt + 1)) - sleep ${interval} - else - echo "$output found!" - exit 0 - fi -done - -echo "Max attempts reached." -exit 1 diff --git a/.gitlab/install_datadog_deps.rb b/.gitlab/install_datadog_deps.rb deleted file mode 100755 index 08d076f4375..00000000000 --- a/.gitlab/install_datadog_deps.rb +++ /dev/null @@ -1,147 +0,0 @@ -require 'open3' -require 'rubygems' -require 'bundler' -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', ENV["ARCH"]) - -versioned_path = tmp_path.join(ruby_api_version) - -FileUtils.mkdir_p(versioned_path, verbose: true) - -gemfile_file_path = versioned_path.join('Gemfile') - -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 - -puts '=== Reading Gemfile ===' -File.foreach(gemfile_file_path) { |x| puts x } -puts "=== Reading Gemfile ===\n" - -puts '=== bundle lock ===' -output, status = Open3.capture2e({ 'BUNDLE_GEMFILE' => gemfile_file_path.to_s }, 'bundle lock') -puts output -puts "=== bundle lock ===\n" - -exit 1 unless status.success? - -lock_file_path = versioned_path.join('Gemfile.lock') - -puts '=== Reading Lockfile ===' -File.foreach(lock_file_path) { |x| puts x } -puts "=== Reading Lockfile ===\n" - -lock_file_parser = Bundler::LockfileParser.new(Bundler.read_file(lock_file_path)) - -gem_version_mapping = lock_file_parser.specs.each_with_object({}) do |spec, hash| - hash[spec.name] = spec.version.to_s -end - -puts gem_version_mapping - -ffi_version = gem_version_mapping.fetch('ffi') -puts "=== ffi version ===" -puts ffi_version - -libdatadog_version = gem_version_mapping.fetch('libdatadog') -puts "=== libdatadog version ===" -puts libdatadog_version - - -env = { - 'GEM_HOME' => versioned_path.to_s, - # Install `datadog` gem locally without its profiling native extension - 'DD_PROFILING_NO_EXTENSION' => 'true', -} - -[ - 'datadog-ruby_core_source', - 'ffi', - 'libddwaf', - 'msgpack', - 'libdatadog', # libdatadog MUST be installed before datadog to ensure libdatadog native extension is compiled - 'datadog', -].each do |gem| - version = gem_version_mapping.delete(gem) - - gem_install_cmd = "gem install #{gem} "\ - "--version #{version} "\ - '--no-document '\ - '--ignore-dependencies ' - - case gem - when 'ffi' - # Install `ffi` gem with its built-in `libffi` native extension instead of using system's `libffi` - gem_install_cmd << '-- --disable-system-libffi ' - when 'datadog' - gem_install_cmd = - "gem install --local #{ENV.fetch('DATADOG_GEM_LOCATION')} "\ - '--no-document '\ - '--ignore-dependencies '\ - end - - puts "Execute: #{gem_install_cmd}" - output, status = Open3.capture2e(env, gem_install_cmd) - puts output - - if status.success? - next - else - exit 1 - end -end - -raise "#{gem_version_mapping.keys.join(',')} are not installed." if gem_version_mapping.any? - -datadog_gem_path = versioned_path.join("gems/datadog-#{ENV.fetch('RUBY_PACKAGE_VERSION')}") -libdatadog_so_file = "libdatadog_api.#{RUBY_VERSION[/\d+.\d+/]}_#{RUBY_PLATFORM}.so" -unless File.exist?("#{datadog_gem_path}/lib/#{libdatadog_so_file}") - raise "Missing #{libdatadog_so_file} in #{datadog_gem_path}." -end - -cached_gems = Dir.glob(versioned_path.join("cache/*.gem")) - -libdatadog_musl = versioned_path + - "gems" + - "libdatadog-#{libdatadog_version}-#{RUBY_PLATFORM}" + - "vendor" + - "libdatadog-#{libdatadog_version.split(".").take(3).join(".")}" + - "#{RUBY_PLATFORM}-musl" - -FileUtils.rm_r( - [ - *cached_gems, - versioned_path.join("gems/ffi-#{ffi_version}/ext"), - libdatadog_musl, - ], - verbose: true -) - -FileUtils.cd(versioned_path.join("extensions/#{Gem::Platform.local}"), verbose: true) do - # Symlink those directories to be utilized by Ruby compiled with shared libraries - FileUtils.ln_sf Gem.extension_api_version, ruby_api_version -end diff --git a/.gitlab/patch_gem_version.sh b/.gitlab/patch_gem_version.sh deleted file mode 100755 index 0dd709f58d8..00000000000 --- a/.gitlab/patch_gem_version.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -set -e - -echo CI=$1 -echo MONOTONIC_ID=$2 -echo GIT_REF=$3 -echo GIT_COMMIT_SHA=$4 - -git_branch="${3#refs/heads/}" -echo git_branch="${git_branch}" - -git_branch_hash=$(echo "$git_branch" | ruby -rdigest -n -e 'print Digest::SHA256.hexdigest($_.chomp)[0, 6]') -echo git_branch_hash="${git_branch_hash}" - -git_short_sha=${4:0:8} -echo git_short_sha=$git_short_sha - -PRE=dev -echo PRE="${PRE}" - -# Set component values: -# - PRE is `dev` to denote being a development version and -# act as a categorizer. -# - BUILD starts with git branch sha for grouping, prefixed by `b`. -# - BUILD has CI run id for traceability, prefixed by `gha` or `glci` -# for identification. -# - BUILD has commit next for traceability, prefixed git-describe -# style by `g` for identification. -BUILD="b${git_branch_hash}.${1}${2}.g${git_short_sha}" -echo BUILD="${BUILD}" - -# Patch in components -sed lib/datadog/version.rb -i -e "s/^\([\t ]*PRE\) *= */\1 = \'${PRE}\' # /" -sed lib/datadog/version.rb -i -e "s/^\([\t ]*BUILD\) *= */\1 = \'${BUILD}\' # /" - -# Test result -cat lib/datadog/version.rb | grep -e PRE -e BUILD - -ruby -Ilib -rdatadog/version -e 'puts Datadog::VERSION::STRING' -ruby -Ilib -rdatadog/version -e 'puts Gem::Version.new(Datadog::VERSION::STRING).to_s' diff --git a/.gitlab/prepare-oci-package.sh b/.gitlab/prepare-oci-package.sh deleted file mode 100755 index d051f359c15..00000000000 --- a/.gitlab/prepare-oci-package.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e - -mkdir sources - -cp ../lib-injection/host_inject.rb sources -cp ../lib-injection/requirements.json sources/requirements.json -# Kubernetes injection expects a different path -ln -rs sources/host_inject.rb sources/auto_inject.rb - -cp -r ../tmp/${ARCH}/* sources - -cp ../tmp/version sources