Skip to content

Commit

Permalink
Merge pull request #179 from DataDog/anmarchenko/fix_jruby_ci
Browse files Browse the repository at this point in the history
[NO-TICKET] simplify and fix CI
  • Loading branch information
anmarchenko authored May 21, 2024
2 parents 79224f2 + 4022d4e commit 80e7b13
Show file tree
Hide file tree
Showing 103 changed files with 1,533 additions and 1,387 deletions.
16 changes: 2 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ test_containers:
<<: *job_parameters
docker:
- *container_base
- &container_agent
image: datadog/agent
environment:
- DD_APM_ENABLED=true
- DD_BIND_HOST=0.0.0.0
- DD_API_KEY=00000000000000000000000000000000
- DD_HOSTNAME=datadog-ci-rb-ci
- &agent_port 8126

check_exact_bundle_cache_hit: &check_exact_bundle_cache_hit
run:
Expand Down Expand Up @@ -189,7 +181,6 @@ orbs:
<<: *test_job_default
docker:
- <<: *container_base
- *container_agent
parallelism: 8
steps:
- restore_cache:
Expand All @@ -203,9 +194,6 @@ orbs:
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
# Wait for containers to start
- docker-wait:
port: *agent_port
- *step_run_all_tests
- store_test_results:
path: /tmp/rspec
Expand Down Expand Up @@ -318,8 +306,8 @@ job_configuration:
# ADD NEW RUBIES HERE
- &config-jruby-9_4
<<: *filters_all_branches_and_tags
ruby_version: 'jruby-9.4.0.0'
image: ghcr.io/datadog/dd-trace-rb/jruby:9.4.0.0-dd
ruby_version: 'jruby-9.4.7.0'
image: ghcr.io/datadog/dd-trace-rb/jruby:9.4.7.0-dd
resource_class_to_use: medium+

workflows:
Expand Down
4 changes: 0 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
DD_AGENT_HOST=localhost
DD_API_KEY=00000000000000000000000000000000
DD_METRIC_AGENT_PORT=8125
DD_TRACE_AGENT_PORT=8126
TEST_DDAGENT_VAR_RUN=/var/run/datadog
44 changes: 3 additions & 41 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,23 @@ services:
env_file: ./.env
environment: &common-environment
BUNDLE_GEMFILE: /app/Gemfile-2.7
DD_AGENT_HOST: ddagent
TEST_DATADOG_INTEGRATION: 1
DDTRACE_CI: true
stdin_open: true
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-2.7:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
datadog-ci-3.0:
image: ghcr.io/datadog/dd-trace-rb/ruby:3.0.4-dd
command: /bin/bash
env_file: ./.env
environment: &common-environment-3x
BUNDLE_GEMFILE: /app/Gemfile-3.0
DD_AGENT_HOST: ddagent
stdin_open: true
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-3.0:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
datadog-ci-3.1:
image: ghcr.io/datadog/dd-trace-rb/ruby:3.1.2-dd
command: /bin/bash
Expand All @@ -41,9 +34,7 @@ services:
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-3.1:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
datadog-ci-3.2:
image: ghcr.io/datadog/dd-trace-rb/ruby:3.2.0-dd
command: /bin/bash
Expand All @@ -55,9 +46,7 @@ services:
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-3.2:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
datadog-ci-3.3:
image: ghcr.io/datadog/dd-trace-rb/ruby:3.3.0-dd
command: /bin/bash
Expand All @@ -69,12 +58,10 @@ services:
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-3.3:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
# ADD NEW RUBIES HERE
datadog-ci-jruby-9.4:
image: ghcr.io/datadog/dd-trace-rb/jruby:9.4.0.0-dd
image: ghcr.io/datadog/dd-trace-rb/jruby:9.4.7.0-dd
command: /bin/bash
env_file: ./.env
environment:
Expand All @@ -85,35 +72,10 @@ services:
volumes:
- .:/app
- bundle-jruby-9.4:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
ddagent:
image: datadog/agent
environment:
- DD_APM_ENABLED=true
- DD_BIND_HOST=0.0.0.0
- "DD_API_KEY=${DD_API_KEY}"
- DD_HOSTNAME=dd-trace-rb-ci
- DD_APM_RECEIVER_SOCKET=/var/run/datadog/apm.socket
expose:
- "8125/udp"
- "8126"
ports:
- "127.0.0.1:${DD_METRIC_AGENT_PORT}:8125/udp"
- "127.0.0.1:${DD_TRACE_AGENT_PORT}:8126"
volumes:
- ddagent_var_run:/var/run/datadog
volumes:
bundle-2.7:
bundle-3.0:
bundle-3.1:
bundle-3.2:
bundle-3.3: # ADD NEW RUBIES HERE

bundle-jruby-9.4:
ddagent_var_run: # Temporary folder used while compiling the profiling native extension. We place this in a volume to avoid the

# massive performance hit (seconds to minutes) that we get when the tmp folder is shared with the host on macOS.
# Hopefully this will be fixed by
# https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/
# (which is not available for those of us still on macOS 11).
extension-build-tmp:
bundle-3.3:
bundle-jruby-9.4: # ADD NEW RUBIES HERE
28 changes: 15 additions & 13 deletions gemfiles/jruby_9.4_activesupport_4.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GEM
ffi (~> 1.0)
lint_roller (1.1.0)
method_source (1.1.0)
minitest (5.22.3)
minitest (5.23.0)
msgpack (1.7.2-java)
os (1.1.4)
parallel (1.24.0)
Expand All @@ -52,13 +52,14 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
racc (1.7.3-java)
racc (1.8.0-java)
rainbow (3.1.1)
rake (13.2.1)
rake-compiler (1.2.7)
rake
regexp_parser (2.9.0)
rexml (3.2.6)
regexp_parser (2.9.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -70,13 +71,13 @@ GEM
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.62.1)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -89,9 +90,9 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-performance (1.20.2)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
Expand All @@ -104,18 +105,19 @@ GEM
simplecov_json_formatter (0.1.4)
spoon (0.0.6)
ffi
standard (1.35.1)
standard (1.36.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.62.0)
rubocop (~> 1.63.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
rubocop-performance (~> 1.21.0)
strscan (3.1.0-java)
thor (1.3.1)
thread_safe (0.3.6-java)
timecop (0.9.8)
Expand Down
28 changes: 15 additions & 13 deletions gemfiles/jruby_9.4_activesupport_5.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GEM
ffi (~> 1.0)
lint_roller (1.1.0)
method_source (1.1.0)
minitest (5.22.3)
minitest (5.23.0)
msgpack (1.7.2-java)
os (1.1.4)
parallel (1.24.0)
Expand All @@ -52,13 +52,14 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
racc (1.7.3-java)
racc (1.8.0-java)
rainbow (3.1.1)
rake (13.2.1)
rake-compiler (1.2.7)
rake
regexp_parser (2.9.0)
rexml (3.2.6)
regexp_parser (2.9.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -70,13 +71,13 @@ GEM
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.62.1)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -89,9 +90,9 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-performance (1.20.2)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
Expand All @@ -104,18 +105,19 @@ GEM
simplecov_json_formatter (0.1.4)
spoon (0.0.6)
ffi
standard (1.35.1)
standard (1.36.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.62.0)
rubocop (~> 1.63.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
rubocop-performance (~> 1.21.0)
strscan (3.1.0-java)
thor (1.3.1)
thread_safe (0.3.6-java)
timecop (0.9.8)
Expand Down
Loading

0 comments on commit 80e7b13

Please sign in to comment.