@@ -548,7 +548,15 @@ check_debugger:
548548
549549muzzle :
550550 extends : .gradle_build
551- needs : [ build_tests ]
551+ # needs:parallel:matrix limits this job to a specific build_tests combination.
552+ # Keep matrix vars exact and in build_tests declaration order:
553+ # https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
554+ needs : &needs_build_tests_inst
555+ - job : build_tests
556+ parallel :
557+ matrix :
558+ - GRADLE_TARGET : " :instrumentationTest"
559+ CACHE_TYPE : " inst"
552560 stage : tests
553561 rules :
554562 - if : ' $CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
@@ -586,7 +594,7 @@ muzzle:
586594
587595muzzle-dep-report :
588596 extends : .gradle_build
589- needs : [ build_tests ]
597+ needs : *needs_build_tests_inst
590598 stage : tests
591599 rules :
592600 - if : ' $CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
@@ -737,6 +745,15 @@ agent_integration_tests:
737745
738746test_base :
739747 extends : .test_job
748+ # needs:parallel:matrix limits this job to a specific build_tests combination.
749+ # Keep matrix vars exact and in build_tests declaration order:
750+ # https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
751+ needs :
752+ - job : build_tests
753+ parallel :
754+ matrix :
755+ - GRADLE_TARGET : " :baseTest"
756+ CACHE_TYPE : " base"
740757 variables :
741758 GRADLE_TARGET : " :baseTest"
742759 CACHE_TYPE : " base"
@@ -748,6 +765,7 @@ test_base:
748765
749766test_inst :
750767 extends : .test_job_with_test_agent
768+ needs : *needs_build_tests_inst
751769 variables :
752770 GRADLE_TARGET : " :instrumentationTest"
753771 CACHE_TYPE : " inst"
@@ -756,6 +774,15 @@ test_inst:
756774
757775test_inst_latest :
758776 extends : .test_job_with_test_agent
777+ # needs:parallel:matrix limits this job to a specific build_tests combination.
778+ # Keep matrix vars exact and in build_tests declaration order:
779+ # https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
780+ needs :
781+ - job : build_tests
782+ parallel :
783+ matrix :
784+ - GRADLE_TARGET : " :instrumentationLatestDepTest"
785+ CACHE_TYPE : " latestdep"
759786 variables :
760787 GRADLE_TARGET : " :instrumentationLatestDepTest"
761788 CACHE_TYPE : " latestdep"
@@ -786,6 +813,7 @@ test_flaky:
786813
787814test_flaky_inst :
788815 extends : .test_job
816+ needs : *needs_build_tests_inst
789817 variables :
790818 GRADLE_TARGET : " :instrumentationTest"
791819 GRADLE_PARAMS : " -PrunFlakyTests"
@@ -800,6 +828,15 @@ test_flaky_inst:
800828
801829test_profiling :
802830 extends : .test_job
831+ # needs:parallel:matrix limits this job to a specific build_tests combination.
832+ # Keep matrix vars exact and in build_tests declaration order:
833+ # https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
834+ needs :
835+ - job : build_tests
836+ parallel :
837+ matrix :
838+ - GRADLE_TARGET : " :profilingTest"
839+ CACHE_TYPE : " profiling"
803840 variables :
804841 GRADLE_TARGET : " :profilingTest"
805842 CACHE_TYPE : " profiling"
@@ -819,6 +856,16 @@ test_debugger:
819856
820857test_smoke :
821858 extends : .test_job
859+ # needs:parallel:matrix limits this job to a specific build_tests combination.
860+ # Keep matrix vars exact and in build_tests declaration order:
861+ # https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
862+ needs : &needs_build_tests_smoke
863+ - job : build_tests
864+ parallel :
865+ matrix :
866+ - GRADLE_TARGET : " :smokeTest"
867+ CACHE_TYPE : " smoke"
868+ MAVEN_OPTS : " -Xms256M -Xmx1024M"
822869 variables :
823870 GRADLE_TARGET : " stageMainDist :smokeTest"
824871 GRADLE_PARAMS : " -PskipFlakyTests"
@@ -828,6 +875,7 @@ test_smoke:
828875
829876test_ssi_smoke :
830877 extends : .test_job
878+ needs : *needs_build_tests_smoke
831879 rules :
832880 - if : $CI_COMMIT_BRANCH == "master"
833881 when : on_success
@@ -845,6 +893,7 @@ test_ssi_smoke:
845893
846894test_smoke_graalvm :
847895 extends : .test_job
896+ needs : *needs_build_tests_smoke
848897 tags : [ "arch:amd64" ]
849898 variables :
850899 GRADLE_TARGET : " stageMainDist :dd-smoke-test:spring-boot-3.0-native:test"
@@ -857,6 +906,7 @@ test_smoke_graalvm:
857906
858907test_smoke_semeru8_debugger :
859908 extends : .test_job
909+ needs : *needs_build_tests_smoke
860910 tags : [ "arch:amd64" ]
861911 variables :
862912 GRADLE_TARGET : " stageMainDist dd-smoke-tests:debugger-integration-tests:test"
0 commit comments