@@ -365,6 +365,21 @@ jobs:
365
365
366
366
- display_memory_usage
367
367
368
+ spotless:
369
+ <<: *defaults
370
+ resource_class: medium+
371
+
372
+ steps:
373
+ - setup_code
374
+
375
+ - run:
376
+ name: Run spotless
377
+ command: >-
378
+ JAVA_HOME=$JAVA_11_HOME
379
+ ./gradlew spotlessCheck
380
+ << pipeline.parameters.gradle_flags >>
381
+ --max-workers=8
382
+
368
383
check:
369
384
<<: *defaults
370
385
@@ -690,6 +705,117 @@ jobs:
690
705
- DD_BIND_HOST=0.0.0.0
691
706
- DD_API_KEY=invalid_key_but_this_is_fine
692
707
708
+ test_published_artifacts:
709
+ <<: *defaults
710
+ resource_class: medium
711
+ docker:
712
+ - image: << pipeline.parameters.docker_image >>:{{ docker_image_prefix }}7
713
+
714
+ steps:
715
+ - setup_code
716
+ - restore_dependency_cache:
717
+ cacheType: lib
718
+ - restore_build_cache:
719
+ cacheType: lib
720
+
721
+ - run:
722
+ name: Publish Artifacts Locally
723
+ command: |
724
+ mvn_local_repo=$(./mvnw help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)
725
+ rm -rf "${mvn_local_repo}/com/datadoghq"
726
+ export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
727
+ ./gradlew publishToMavenLocal << pipeline.parameters.gradle_flags >> --max-workers=3
728
+
729
+ - run:
730
+ name: Test Published Artifacts
731
+ command: |
732
+ cd test-published-dependencies
733
+ export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx512M -Xms512M -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
734
+ ./gradlew check --info --max-workers=3
735
+
736
+ - run:
737
+ name: Collect Reports
738
+ when: on_fail
739
+ command: .circleci/collect_reports.sh
740
+
741
+ - store_artifacts:
742
+ path: ./reports
743
+
744
+ - display_memory_usage
745
+ muzzle-dep-report:
746
+ <<: *defaults
747
+ resource_class: medium
748
+ steps:
749
+ - setup_code
750
+ - skip_unless_matching_files_changed:
751
+ pattern: " dd-java-agent/instrumentation"
752
+ - restore_dependency_cache:
753
+ cacheType: inst
754
+ - restore_build_cache:
755
+ cacheType: inst
756
+ - run:
757
+ name: Generate muzzle dep report
758
+ command: >-
759
+ SKIP_BUILDSCAN="true"
760
+ GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
761
+ ./gradlew generateMuzzleReport muzzleInstrumentationReport
762
+ - run:
763
+ name: Collect Reports
764
+ command: .circleci/collect_muzzle_deps.sh
765
+ - store_artifacts:
766
+ path: ./reports
767
+
768
+ muzzle:
769
+ <<: *defaults
770
+ resource_class: medium+
771
+ parallelism: 4
772
+ steps:
773
+ - setup_code
774
+
775
+ - skip_unless_matching_files_changed:
776
+ pattern: " dd-java-agent/instrumentation"
777
+
778
+ # We are not running with a separate cache of all muzzle artifacts here because it gets very big and
779
+ # ends up taking more time restoring /saving than the actual increase in time it takes just
780
+ # downloading the artifacts each time.
781
+ #
782
+ # Let ' s at least restore the build cache to have something to start from.
783
+ - restore_dependency_cache:
784
+ cacheType: inst
785
+ - restore_build_cache:
786
+ cacheType: inst
787
+
788
+ - run:
789
+ name: Gather muzzle tasks
790
+ command: >-
791
+ SKIP_BUILDSCAN="true"
792
+ GRADLE_OPTS="-Dorg.gradle.jvmargs=' -Xmx2G -Xms2G -XX:ErrorFile =/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath =/tmp ' "
793
+ ./gradlew writeMuzzleTasksToFile
794
+ << pipeline.parameters.gradle_flags >>
795
+ --max-workers=3
796
+
797
+ - run:
798
+ name: Verify Muzzle
799
+ command: >-
800
+ SKIP_BUILDSCAN="true"
801
+ GRADLE_OPTS="-Dorg.gradle.jvmargs=' -Xmx3G -Xms2G -XX:ErrorFile =/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath =/tmp ' "
802
+ ./gradlew `circleci tests split --split-by=timings workspace/build/muzzleTasks | xargs`
803
+ << pipeline.parameters.gradle_flags >>
804
+ --max-workers=4
805
+
806
+ - run:
807
+ name: Collect Reports
808
+ when: on_fail
809
+ command: .circleci/collect_reports.sh
810
+
811
+ - store_artifacts:
812
+ path: ./reports
813
+
814
+ - store_test_results:
815
+ path: workspace/build/muzzle-test-results
816
+
817
+ - display_memory_usage
818
+
693
819
system-tests:
694
820
machine:
695
821
image: ubuntu-2404:current
@@ -943,6 +1069,7 @@ build_test_jobs: &build_test_jobs
943
1069
name: build_profiling
944
1070
gradleTarget: :profilingTest
945
1071
cacheType: profiling
1072
+ - spotless
946
1073
947
1074
- fan_in:
948
1075
requires:
@@ -951,6 +1078,7 @@ build_test_jobs: &build_test_jobs
951
1078
- build_inst
952
1079
- build_smoke
953
1080
- build_profiling
1081
+ - spotless
954
1082
name: ok_to_test
955
1083
stage: ok_to_test
956
1084
@@ -1299,6 +1427,24 @@ build_test_jobs: &build_test_jobs
1299
1427
cacheType: base
1300
1428
testJvm: "8"
1301
1429
1430
+ - test_published_artifacts:
1431
+ requires:
1432
+ - ok_to_test
1433
+
1434
+ - muzzle:
1435
+ requires:
1436
+ - ok_to_test
1437
+ filters:
1438
+ branches:
1439
+ ignore:
1440
+ - master
1441
+ - project/*
1442
+ - release/*
1443
+
1444
+ - muzzle-dep-report:
1445
+ requires:
1446
+ - ok_to_test
1447
+
1302
1448
- system-tests:
1303
1449
requires:
1304
1450
- ok_to_test
@@ -1319,6 +1465,7 @@ build_test_jobs: &build_test_jobs
1319
1465
1320
1466
- fan_in:
1321
1467
requires:
1468
+ - test_published_artifacts
1322
1469
{% for jdk in all_jdks %}
1323
1470
- "test_{{ jdk }}_profiling"
1324
1471
{% endfor %}
@@ -1327,6 +1474,7 @@ build_test_jobs: &build_test_jobs
1327
1474
1328
1475
- fan_in:
1329
1476
requires:
1477
+ - test_published_artifacts
1330
1478
{% for jdk in all_jdks %}
1331
1479
- "test_{{ jdk }}_debugger"
1332
1480
{% endfor %}
@@ -1338,11 +1486,13 @@ build_test_jobs: &build_test_jobs
1338
1486
- fan_in:
1339
1487
requires:
1340
1488
- check
1489
+ - test_published_artifacts
1341
1490
- agent_integration_tests
1342
1491
{% for jdk in all_jdks %}
1343
1492
- "test_{{ jdk }}"
1344
1493
{% endfor %}
1345
1494
- test_inst_latest
1495
+ - muzzle
1346
1496
- profiling
1347
1497
- debugger
1348
1498
- system-tests
0 commit comments